]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.C
revert recent change to development/FORMAT (don't change history)
[lyx.git] / src / BufferView.C
index f5b1db983ecb0032fe231a42753818dc479c2e46..809c8babca05234c52eca85cca2bdac8d7de2261 100644 (file)
@@ -150,6 +150,12 @@ void BufferView::scrollDocView(int value)
 }
 
 
+void BufferView::setCursorFromScrollbar()
+{
+       pimpl_->setCursorFromScrollbar();
+}
+
+
 bool BufferView::available() const
 {
        return pimpl_->available();
@@ -316,11 +322,13 @@ void BufferView::mouseSetCursor(LCursor & cur)
        BOOST_ASSERT(&cur.bv() == this);
 
        // Has the cursor just left the inset?
+       bool badcursor = false;
        if (&cursor().inset() != &cur.inset())
-               cursor().inset().notifyCursorLeaves(cursor());
+               badcursor = cursor().inset().notifyCursorLeaves(cursor());
 
        // do the dEPM magic if needed
-       if (cursor().inTexted())
+       // FIXME: move this to InsetText::notifyCursorLeaves?
+       if (!badcursor && cursor().inTexted())
                cursor().text()->deleteEmptyParagraphMechanism(cur, cursor());
 
        cursor() = cur;