]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.C
minimal effort implementation of:
[lyx.git] / src / BufferView.C
index f30d87a050bf32e81c6cd09233f0394363e40aaa..6c8f4bce793a55d69841219884feb0b52f52100a 100644 (file)
@@ -93,12 +93,6 @@ void BufferView::setBuffer(Buffer * b)
 }
 
 
-string BufferView::firstLayout()
-{
-       return pimpl_->firstLayout();
-}
-
-
 bool BufferView::loadLyXFile(string const & fn, bool tl)
 {
        return pimpl_->loadLyXFile(fn, tl);
@@ -322,11 +316,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;