[LyX/master] Do not redraw cursor twice with Page Up/Down

Jean-Marc Lasgouttes lasgouttes at lyx.org
Fri Feb 12 17:31:51 UTC 2021

commit 1cbbe5c3aaaff79a4662b68e09260e7282cc534b
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date:   Fri Feb 12 15:22:23 2021 +0100

    Do not redraw cursor twice with Page Up/Down
    Just recompute metrics instead of triggering a full redraw. The old
    behavior was that, when the document was less that one page long, the
    cursor would blink to the top of the document before going to its
    correct position.
 src/BufferView.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/BufferView.cpp b/src/BufferView.cpp
index f23027c..84f107a 100644
--- a/src/BufferView.cpp
+++ b/src/BufferView.cpp
@@ -1855,7 +1855,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
 		// Force an immediate computation of metrics because we need it below
-		processUpdateFlags(Update::Force);
+		updateMetrics();
 		d->text_metrics_[&buffer_.text()].editXY(cur, p.x_, p.y_,
 			true, act == LFUN_SCREEN_UP);

More information about the lyx-cvs mailing list