]> git.lyx.org Git - features.git/commitdiff
Fix bug 3225.
authorAbdelrazak Younes <younes@lyx.org>
Wed, 14 Feb 2007 11:21:39 +0000 (11:21 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Wed, 14 Feb 2007 11:21:39 +0000 (11:21 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17181 a592a061-630c-0410-9148-cb99ea01b6c8

src/CutAndPaste.C

index ac539c07d743823a3c50f0015b866413ff2891b3..109d9c20db3067b697bf6b9c011a0278c710b2fa 100644 (file)
@@ -546,16 +546,17 @@ void cutSelection(LCursor & cur, bool doclear, bool realcut)
                                cur.selBegin().pos(), endpos,
                                doclear);
 
-               // sometimes necessary
-               if (doclear)
-                       text->paragraphs()[begpit].stripLeadingSpaces(bp.trackChanges);
-
                // cutSelection can invalidate the cursor so we need to set
                // it anew. (Lgb)
                // we prefer the end for when tracking changes
                cur.pos() = endpos;
                cur.pit() = endpit;
 
+               // sometimes necessary
+               if (doclear 
+                       && text->paragraphs()[begpit].stripLeadingSpaces(bp.trackChanges))
+                       cur.fixIfBroken();
+
                // need a valid cursor. (Lgb)
                cur.clearSelection();
                updateLabels(cur.buffer());