]> git.lyx.org Git - features.git/commitdiff
Fix bug #6193: Crash when navigating away from an empty super/subscript.
authorVincent van Ravesteijn <vfr@lyx.org>
Tue, 27 Oct 2009 00:11:56 +0000 (00:11 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Tue, 27 Oct 2009 00:11:56 +0000 (00:11 +0000)
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

src/BufferView.cpp

index 70ce4b8ce5738897b7a0e8c4fa2dc59b7ea52e62..d07a7d9cac9b9a992aea82ea3ccb934280768e65 100644 (file)
@@ -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);