From: Vincent van Ravesteijn Date: Wed, 23 May 2012 06:02:40 +0000 (+0200) Subject: Fix bug #8166: Crash on clicking away from empty last paragraph X-Git-Tag: 2.1.0beta1~1842 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d20cb73b874a30b82fe01d3b8f385ef066fafedf;p=features.git Fix bug #8166: Crash on clicking away from empty last paragraph This reverts the previous fix in [0a33374c/lyxgit] and fixes it differently. We always have to call 'notifyCursorLeaves', but we only have to make sure that we call the 'fixIfBroken()' functions first. --- diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 1017cea7c0..9b6c6b3c18 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -2201,8 +2201,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(); }