Fix bug #8166: Crash on clicking away from empty last paragraph

We always have to call 'notifyCursorLeaves', but we only have to make sure
that we call the 'fixIfBroken()' functions first.
(cherry picked from commit d20cb73b87)
This commit is contained in:
Vincent van Ravesteijn 2012-05-23 08:02:40 +02:00
parent a96e49ef62
commit dacab5cf7b

View 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();
}