]> git.lyx.org Git - features.git/commitdiff
Potential fix for #7591.
authorRichard Heck <rgheck@comcast.net>
Sat, 28 May 2011 14:34:19 +0000 (14:34 +0000)
committerRichard Heck <rgheck@comcast.net>
Sat, 28 May 2011 14:34:19 +0000 (14:34 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38875 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.cpp

index 2977600915b5af90c7c3bbb31768a3d006fa9480..9ec1e7d4b3443e5b5823acf8457ff61012a24725 100644 (file)
@@ -669,7 +669,10 @@ void BufferView::setCursorFromScrollbar()
        // FIXME: Care about the d->cursor_ flags to redraw if needed
        Cursor old = d->cursor_;
        mouseSetCursor(cur);
-       bool badcursor = notifyCursorLeavesOrEnters(old, d->cursor_);
+       // the DEPM call in mouseSetCursor() might have destroyed the
+       // paragraph the cursor is in.
+       bool badcursor = old.fixIfBroken();
+       badcursor |= notifyCursorLeavesOrEnters(old, d->cursor_);
        if (badcursor)
                d->cursor_.fixIfBroken();
 }