* math_nestinset.C

(MathNestInset::doDispatch): replace recordUndo by recordUndoInset for
	LFUN_DELETE, to fix undo behaviour



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13658 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Martin Vermeer 2006-04-13 08:40:11 +00:00
parent 637a28fe60
commit 7db0b5ae00

View File

@ -621,7 +621,7 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
case LFUN_DELETE_WORD_BACKWARD:
case LFUN_BACKSPACE:
if (cur.pos() == 0)
// delete whole cell
// May affect external cell:
recordUndoInset(cur, Undo::ATOMIC);
else
recordUndo(cur, Undo::ATOMIC);
@ -630,7 +630,11 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
case LFUN_DELETE_WORD_FORWARD:
case LFUN_DELETE:
recordUndo(cur);
if (cur.pos() == cur.lastpos())
// May affect external cell:
recordUndoInset(cur, Undo::ATOMIC);
else
recordUndo(cur, Undo::ATOMIC);
cur.erase();
break;