From 2c615002b1a03823ea9d3e2942b113d0153d33ad Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Wed, 4 Nov 2009 23:11:03 +0000 Subject: [PATCH] branch: Fix bug #6193: Crash when navigating away from an empty super/subscript. see r31758. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31860 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView.cpp | 3 ++- status.16x | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 88f8a2b02c..a9f2f42fe5 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -1961,6 +1961,8 @@ bool BufferView::mouseSetCursor(Cursor & cur, bool select) // persistent selection cap::saveSelection(cursor()); + d->cursor_.macroModeClose(); + // Has the cursor just left the inset? bool badcursor = false; bool leftinset = (&d->cursor_.inset() != &cur.inset()); @@ -1981,7 +1983,6 @@ bool BufferView::mouseSetCursor(Cursor & cur, bool select) bool update = leftinset; if (!do_selection && !badcursor && d->cursor_.inTexted()) update |= checkDepm(cur, d->cursor_); - d->cursor_.macroModeClose(); d->cursor_.resetAnchor(); d->cursor_.setCursor(cur); diff --git a/status.16x b/status.16x index f72450dcf0..c88c5a25d2 100644 --- a/status.16x +++ b/status.16x @@ -184,6 +184,8 @@ What's new which is missing a LaTeX command representation in the unicodesymbols file (bug 6250). +- Fix a crash when leaving an empty superscript or subscript (bug 6193). + - Fix a number of assertions when displaying error messages (bug 6205). - Fix bad allocation exception when displaying long tooltips (bug 6215).