]> git.lyx.org Git - features.git/commitdiff
* LyXText::erase(): make sure the paragraph breaking is up to date. This might be...
authorAbdelrazak Younes <younes@lyx.org>
Mon, 13 Nov 2006 16:59:10 +0000 (16:59 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Mon, 13 Nov 2006 16:59:10 +0000 (16:59 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15905 a592a061-630c-0410-9148-cb99ea01b6c8

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;
 }