]> git.lyx.org Git - lyx.git/blobdiff - src/buffer.C
Hotfix to move cursor to the right when pressing M-m g x in text mode.
[lyx.git] / src / buffer.C
index 67ddc7672e3990fc07672b5c4c44491a1a8254db..d55a1b38357ba2447ee57867bbd40936bb993ea2 100644 (file)
@@ -625,6 +625,10 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
                        return false; // no end read yet
                }
 
+               // we have to reset the font as in the old format after a float
+               // the font was automatically reset!
+               font = LyXFont(LyXFont::ALL_INHERIT, params.language);
+
                // Here we need to check for \end_deeper and handle that
                // before we do the footnote parsing.
                // This _is_ a hack! (Lgb)
@@ -1396,10 +1400,12 @@ void Buffer::insertStringAsLines(Paragraph *& par, pos_type & pos,
        par->checkInsertChar(font);
        // insert the string, don't insert doublespace
        bool space_inserted = true;
+       bool autobreakrows = !par->inInset() ||
+               static_cast<InsetText *>(par->inInset())->getAutoBreakRows();
        for(string::const_iterator cit = str.begin();
            cit != str.end(); ++cit) {
                if (*cit == '\n') {
-                       if (par->size() || layout.keepempty) {
+                       if (autobreakrows && (par->size() || layout.keepempty)) {
                                par->breakParagraph(params, pos,
                                                    layout.isEnvironment());
                                par = par->next();