]> git.lyx.org Git - lyx.git/blobdiff - src/buffer.C
Fix deleting of paragraphs after undo (fix #236).
[lyx.git] / src / buffer.C
index dae6e9a7c67cb7cf353b42c1d339ad9165345161..6c4f9e91b148b96a246e1e8944fad86e4b641736 100644 (file)
@@ -333,6 +333,7 @@ bool Buffer::readLyXformat2(LyXLex & lex, Paragraph * par)
 
        if (!par) {
                par = new Paragraph;
+               par->layout(textclasslist[params.textclass].defaultLayoutName());
        } else {
                // We are inserting into an existing document
                users->text->breakParagraph(users);
@@ -544,6 +545,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
                                first_par = par;
                        else {
                                par = new Paragraph(par);
+                               par->layout(textclasslist[params.textclass].defaultLayoutName());
                        }
                        pos = 0;
                        par->layout(layoutname);
@@ -1994,7 +1996,7 @@ string const Buffer::asciiParagraph(Paragraph const * par,
 
                        } else {
                                if (c != '\0') {
-                                       word.push_back(c);
+                                       word += c;
                                } else {
                                        lyxerr[Debug::INFO] <<
                                                "writeAsciiFile: NULL char in structure." << endl;
@@ -3456,7 +3458,7 @@ void Buffer::simpleDocBookOnePar(ostream & os,
        // resets description flag correctly
        if (desc_on == 1) {
                // <term> not closed...
-               os << "</term>";
+               os << "</term>\n<listitem><para>&nbsp;</para>";
        }
        if (style.free_spacing) os << '\n';
 }