* text.C (Delete): when deleting a text inset in change-tracking

mode, make the cursor jump over it; avoid crash in setCursorIntern
	by using the right LyXText.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@16002 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2006-11-20 18:48:08 +00:00
parent 2666ba7c20
commit 43cb1d2357

View File

@ -1653,7 +1653,7 @@ bool LyXText::Delete(LCursor & cur)
recordUndo(cur, Undo::DELETE);
par.erase(cur.pos());
if (par.lookupChange(cur.pos()) == Change::DELETED)
cur.forwardPos();
cur.forwardPosNoDescend();
needsUpdate = true;
} else if (cur.pit() != cur.lastpit()) {
if (cur.buffer().params().tracking_changes
@ -1673,7 +1673,7 @@ bool LyXText::Delete(LCursor & cur)
// Make sure the cursor is correct. Is this really needed?
if (needsUpdate)
setCursorIntern(cur, cur.pit(), cur.pos());
cur.text()->setCursorIntern(cur, cur.pit(), cur.pos());
return needsUpdate;
}