]> git.lyx.org Git - features.git/commitdiff
Fix bug #7091 and bug #7094
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sun, 28 Nov 2010 17:02:10 +0000 (17:02 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sun, 28 Nov 2010 17:02:10 +0000 (17:02 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36556 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiApplication.cpp

index 00e58955bec90e4668215c969f1910ca08fd3957..641431a91fe2c48b2e593e8e65d028250aedffd5 100644 (file)
@@ -1113,15 +1113,17 @@ void GuiApplication::dispatch(FuncRequest const & cmd)
                // Actually, this test ought not to be done at all, since the
                // whole InsetBibitem business is a mess. But that is a different
                // story.
-               int const moveCursor = cursor.paragraph().checkBiblio(buf);
-               if (moveCursor > 0)
-                       cursor.posForward();
-               else if (moveCursor < 0 && cursor.pos() >= -moveCursor)
-                       cursor.posBackward();
-
-               if (moveCursor != 0 || dr.needBufferUpdate()) {
-                       cursor.clearBufferUpdate();
-                       buf.updateBuffer();
+               if (cursor.inTexted()) {
+                       int const moveCursor = cursor.paragraph().checkBiblio(buf);
+                       if (moveCursor > 0)
+                               cursor.posForward();
+                       else if (moveCursor < 0 && cursor.pos() >= -moveCursor)
+                               cursor.posBackward();
+
+                       if (moveCursor != 0 || dr.needBufferUpdate()) {
+                               cursor.clearBufferUpdate();
+                               buf.updateBuffer();
+                       }
                }
                // BufferView::update() updates the ViewMetricsInfo and
                // also initializes the position cache for all insets in