]> git.lyx.org Git - lyx.git/blobdiff - src/buffer.C
Fix deleting of paragraphs after undo (fix #236).
[lyx.git] / src / buffer.C
index a0b13320030e3981458cc90cb9fcfa1e93b3d006..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;