]> git.lyx.org Git - features.git/commitdiff
Fix bug #8140: Crash with math macros and input completion
authorEnrico Forestieri <forenr@lyx.org>
Mon, 30 Apr 2012 21:55:34 +0000 (23:55 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Mon, 30 Apr 2012 21:55:34 +0000 (23:55 +0200)
When clicking away in the same math inset after hitting '\', the
cursor may be broken and all of its instances have to be fixed.

src/BufferView.cpp

index bc8599feefa9e3c74da694be759f5a43547614a1..a30c0f0c2fdc8545d8125c61360b2c34a3888c0d 100644 (file)
@@ -2201,8 +2201,8 @@ void BufferView::mouseEventDispatch(FuncRequest const & cmd0)
 
        // Notify left insets
        if (cur != old) {
-               old.fixIfBroken();
-               bool badcursor = notifyCursorLeavesOrEnters(old, cur);
+               bool badcursor = old.fixIfBroken() | cur.fixIfBroken()
+                               | notifyCursorLeavesOrEnters(old, cur);
                if (badcursor)
                        cursor().fixIfBroken();
        }