fix bug 1598 (crash on cursor up/down in script)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9616 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2005-02-12 15:46:22 +00:00
parent ed0d2079b8
commit 70f4ff1a59
2 changed files with 9 additions and 1 deletions

View File

@ -1,4 +1,8 @@
<<<<<<< ChangeLog 2005-02-12 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* math_nestinset.C (doDispatch): normalize() cursor after moving up/down
(fixes assert and bug 1598).
2005-02-09 Martin Vermeer <martin.vermeer@hut.fi> 2005-02-09 Martin Vermeer <martin.vermeer@hut.fi>
* math_gridinset.[hC]: add facilities for drawing/deleting partition * math_gridinset.[hC]: add facilities for drawing/deleting partition

View File

@ -509,6 +509,8 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
cur.selHandle(cmd.action == LFUN_UPSEL); cur.selHandle(cmd.action == LFUN_UPSEL);
if (!cur.up()) if (!cur.up())
cmd = FuncRequest(LFUN_FINISHED_UP); cmd = FuncRequest(LFUN_FINISHED_UP);
// fixes bug 1598. Please check!
cur.normalize();
break; break;
case LFUN_DOWNSEL: case LFUN_DOWNSEL:
@ -516,6 +518,8 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
cur.selHandle(cmd.action == LFUN_DOWNSEL); cur.selHandle(cmd.action == LFUN_DOWNSEL);
if (!cur.down()) if (!cur.down())
cmd = FuncRequest(LFUN_FINISHED_DOWN); cmd = FuncRequest(LFUN_FINISHED_DOWN);
// fixes bug 1598. Please check!
cur.normalize();
break; break;
case LFUN_MOUSE_DOUBLE: case LFUN_MOUSE_DOUBLE: