]> git.lyx.org Git - features.git/commitdiff
Some more debug information in case the cursor is ill
authorAndré Pönitz <poenitz@gmx.net>
Tue, 27 Mar 2007 14:35:48 +0000 (14:35 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Tue, 27 Mar 2007 14:35:48 +0000 (14:35 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17592 a592a061-630c-0410-9148-cb99ea01b6c8

src/cursor.C

index 387fb087df072c30d9203883cffcb069491a37dd..7acb8c48fd891f7dce07f23c54357d0bf845cab1 100644 (file)
@@ -1299,6 +1299,7 @@ void LCursor::fixIfBroken()
                               << ", max is " << copy.lastidx()
                               << " at level " << copy.depth()
                               << ". Trying to correct this."  << endl;
+                       lyxerr << "old: " << *this << endl;
                        newdepth = copy.depth() - 1;
                }
                else if (copy.pit() > copy.lastpit()) {
@@ -1306,6 +1307,7 @@ void LCursor::fixIfBroken()
                               << ", max is " << copy.lastpit()
                               << " at level " << copy.depth()
                               << ". Trying to correct this."  << endl;
+                       lyxerr << "old: " << *this << endl;
                        newdepth = copy.depth() - 1;
                }
                else if (copy.pos() > copy.lastpos()) {
@@ -1313,6 +1315,7 @@ void LCursor::fixIfBroken()
                               << ", max is " << copy.lastpos()
                               << " at level " << copy.depth()
                               << ". Trying to correct this."  << endl;
+                       lyxerr << "old: " << *this << endl;
                        newdepth = copy.depth() - 1;
                }
                copy.pop();
@@ -1322,6 +1325,8 @@ void LCursor::fixIfBroken()
        while (depth() > newdepth) {
                pop();
                lyxerr << "correcting cursor to level " << depth() << endl;
+               lyxerr << "new: " << *this << endl;
+               clearSelection();
        }
 }