]> git.lyx.org Git - features.git/commitdiff
Fix bug #8296: Crash when clicking on completion in math
authorVincent van Ravesteijn <vfr@lyx.org>
Sun, 23 Sep 2012 14:44:22 +0000 (16:44 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 20 Jan 2013 13:31:23 +0000 (14:31 +0100)
When the user clicks on the completion, the completion disappears. This
means that we have to fix the cursor before setting it.

src/BufferView.cpp
status.20x

index 8130db3bea7ff3eddd11ecba208bd23e6ab22012..057fe0bb32199be516d99812ab2b9cbb3794a60b 100644 (file)
@@ -2443,6 +2443,8 @@ bool BufferView::mouseSetCursor(Cursor & cur, bool select)
                cap::saveSelection(cursor());
 
        d->cursor_.macroModeClose();
+       // If a macro has been finalized, the cursor might have been broken
+       cur.fixIfBroken();
 
        // Has the cursor just left the inset?
        bool const leftinset = (&d->cursor_.inset() != &cur.inset());
index 07b42a726705906b6d1f5b9b297203af15a4e18b..6ad00b89c37b3b70217b5b56fc55c628b5be5116 100644 (file)
@@ -105,6 +105,8 @@ What's new
 
 * USER INTERFACE
 
+- Fix crash when clicking on a completion in math mode (bug 8296).
+
 - Fix regression in which clicking in the main work area always resets
   the selected format in View -> Source (bug 8411).