From: Vincent van Ravesteijn Date: Tue, 27 Oct 2009 00:11:56 +0000 (+0000) Subject: Fix bug #6193: Crash when navigating away from an empty super/subscript. X-Git-Tag: 2.0.0~5296 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d9ab7302a665ccb57d73eced316649a022c965bb;p=features.git Fix bug #6193: Crash when navigating away from an empty super/subscript. I still don't know why it is that bad that this call is made below, but this seems to fix the problem. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31758 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 70ce4b8ce5..d07a7d9cac 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -2284,6 +2284,8 @@ bool BufferView::mouseSetCursor(Cursor & cur, bool select) // persistent selection cap::saveSelection(cursor()); + d->cursor_.macroModeClose(); + // Has the cursor just left the inset? bool leftinset = (&d->cursor_.inset() != &cur.inset()); if (leftinset) @@ -2299,7 +2301,6 @@ bool BufferView::mouseSetCursor(Cursor & cur, bool select) bool update = leftinset; if (!do_selection && d->cursor_.inTexted()) update |= checkDepm(cur, d->cursor_); - d->cursor_.macroModeClose(); d->cursor_.resetAnchor(); d->cursor_.setCursor(cur);