]> git.lyx.org Git - lyx.git/blobdiff - src/text.C
* LyXText::erase(): make sure the paragraph breaking is up to date. This might be...
[lyx.git] / src / text.C
index e1b7320c643821e725f8642e2d3686ab347e1f55..4baf4a27f047e4b53b1258e89e745aad4173d2de 100644 (file)
@@ -1672,8 +1672,14 @@ bool LyXText::erase(LCursor & cur)
                needsUpdate = dissolveInset(cur);
 
        // Make sure the cursor is correct. Is this really needed?
-       if (needsUpdate)
+       // FIXME: Inserting characters has nothing to do with setting a cursor.
+       // Because of the mix between the model (the paragraph contents)
+       // and the view (the paragraph breaking in rows, we have to do this
+       // here before the setCursorIntern() call.
+       if (needsUpdate) {
+               redoParagraph(cur.bv(), cur.pit());
                setCursorIntern(cur, cur.pit(), cur.pos());
+       }
        
        return needsUpdate;
 }