]> git.lyx.org Git - features.git/commitdiff
Fix bug #8166: Crash on clicking away from empty last paragraph
authorVincent van Ravesteijn <vfr@lyx.org>
Wed, 23 May 2012 06:02:40 +0000 (08:02 +0200)
committerVincent van Ravesteijn <vfr@lyx.org>
Wed, 23 May 2012 06:16:03 +0000 (08:16 +0200)
We always have to call 'notifyCursorLeaves', but we only have to make sure
that we call the 'fixIfBroken()' functions first.
(cherry picked from commit d20cb73b874a30b82fe01d3b8f385ef066fafedf)

src/BufferView.cpp

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