]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.cpp
Some more cleanup of LyXView:
[lyx.git] / src / BufferView.cpp
index 1c911517aba6c9df19944cb8f36412e276bfd6b1..4bd4a99c242a7eb52520b1e9e9c397598c1d3bef 100644 (file)
@@ -647,8 +647,13 @@ bool BufferView::moveToPosition(pit_type bottom_pit, pos_type bottom_pos,
                setCursor(doc_it);
                // set the current font.
                d->cursor_.setCurrentFont();
-               // center the screen on this new position.
-               center();
+               // To center the screen on this new position we need the
+               // paragraph position which is computed at draw() time.
+               // So we need a redraw!
+               buffer_.changed();
+               if (fitCursor())
+                       // We need another redraw because of the screen recentering.
+                       buffer_.changed();
        }
 
        return success;