]> 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 23:01:03 +0000 (01:01 +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.

(cherry picked from commit 982562179801340feff7eb108addd99ec4a05d08)

src/BufferView.cpp
status.20x

index d8a67f2cdb4da55648e0fc8df071dce7dfdf3155..b0d3135b414945e77e28857284162cdfca6b7938 100644 (file)
@@ -2171,8 +2171,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();
        }
index 72ed28d24f7f0ac19f027d1752cd1be8b1291326..46bba5f6bb7c27fdd07eec2e1b3eb7c26dea65be 100644 (file)
@@ -162,6 +162,9 @@ What's new
 
 - Fix the coloring of Quotation marks with change tracking (bug 7653).
 
+- Fix crash when clicking away in the same math inset just after hitting '\'
+  (bug 8140).
+
 
 * DOCUMENTATION AND LOCALIZATION