]> git.lyx.org Git - features.git/commitdiff
LFUN_PARAGRAPH_GOTO: break/continue early. Force a full redraw.
authorAbdelrazak Younes <younes@lyx.org>
Tue, 12 Feb 2008 08:04:59 +0000 (08:04 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 12 Feb 2008 08:04:59 +0000 (08:04 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22954 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.cpp

index 47547dc94fe5c176705f95373e899ca28169a09f..5558f2889b836c6294ec055dee450344ce0d13b9 100644 (file)
@@ -1018,24 +1018,24 @@ bool BufferView::dispatch(FuncRequest const & cmd)
                        DocIterator dit = b->getParFromID(id);
                        if (dit.atEnd()) {
                                LYXERR(Debug::INFO, "No matching paragraph found! [" << id << "].");
+                               ++i;
+                               continue;
+                       }
+                       LYXERR(Debug::INFO, "Paragraph " << dit.paragraph().id()
+                               << " found in buffer `"
+                               << b->absFileName() << "'.");
+
+                       if (b == &buffer_) {
+                               // Set the cursor
+                               setCursor(dit);
+                               processUpdateFlags(Update::Force | Update::FitCursor);
                        } else {
-                               LYXERR(Debug::INFO, "Paragraph " << dit.paragraph().id()
-                                       << " found in buffer `"
-                                       << b->absFileName() << "'.");
-
-                               if (b == &buffer_) {
-                                       // Set the cursor
-                                       setCursor(dit);
-                                       showCursor();
-                               } else {
-                                       // Switch to other buffer view and resend cmd
-                                       theLyXFunc().dispatch(FuncRequest(
-                                               LFUN_BUFFER_SWITCH, b->absFileName()));
-                                       theLyXFunc().dispatch(cmd);
-                               }
-                               break;
+                               // Switch to other buffer view and resend cmd
+                               theLyXFunc().dispatch(FuncRequest(
+                                       LFUN_BUFFER_SWITCH, b->absFileName()));
+                               theLyXFunc().dispatch(cmd);
                        }
-                       ++i;
+                       break;
                }
                break;
        }