fix bug 2058 (crash when undoing math matrix delete)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10510 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2005-10-03 09:50:28 +00:00
parent e4c676a490
commit 66d2b93f7c
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-10-03 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* math_nestinset.C (doDispatch): use recordUndoInset when deleting whole
cell via LFUN_BACKSPACE (fixes bug 2058).
2005-09-27 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* math_nestinset.C (doDispatch): leave inset to the right when hitting ESC.

View File

@ -614,7 +614,11 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
case LFUN_DELETE_WORD_BACKWARD:
case LFUN_BACKSPACE:
recordUndo(cur, Undo::ATOMIC);
if (cur.pos() == 0)
// delete whole cell
recordUndoInset(cur, Undo::ATOMIC);
else
recordUndo(cur, Undo::ATOMIC);
cur.backspace();
break;