#endif
} else if (token == "\\begin_layout") {
lex.eatLine();
- string layoutname = lex.getString();
+ docstring layoutname = lex.getDocString();
font = Font(Font::ALL_INHERIT, bp.language);
change = Change(Change::UNCHANGED);
if (!hasLayout) {
errorList.push_back(ErrorItem(_("Unknown layout"),
bformat(_("Layout '%1$s' does not exist in textclass '%2$s'\nTrying to use the default instead.\n"),
- from_utf8(layoutname), from_utf8(tclass.name())), par.id(), 0, par.size()));
+ layoutname, from_utf8(tclass.name())), par.id(), 0, par.size()));
layoutname = tclass.defaultLayoutName();
}
// row in this paragraph.
RowList::iterator rit = par.rows().begin();
RowList::iterator end = par.rows().end();
-#ifdef WITH_WARNINGS
-#warning This is wrong.
-#endif
+ // FIXME: This is wrong.
int minfill = max_width;
for ( ; rit != end; ++rit)
if (rit->fill() < minfill)
recordUndo(cur, Undo::DELETE);
if(!par.eraseChar(cur.pos(), cur.buffer().params().trackChanges)) {
// the character has been logically deleted only => skip it
- cur.forwardPosNoDescend();
+ cur.top().forwardPos();
}
checkBufferStructure(cur.buffer(), cur);
needsUpdate = true;
depth_type dth = 0;
for (; pit != end; ++pit)
pit->write(buf, os, buf.params(), dth);
+
+ // Close begin_deeper
+ for(; dth > 0; --dth)
+ os << "\n\\end_deeper";
}