From: Jean-Marc Lasgouttes Date: Tue, 14 Apr 2020 15:57:49 +0000 (+0200) Subject: Fixup 294969c6: do not forget to update metrics X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5445183d93f34f636a96a51c3df2dd3f944c7854;p=features.git Fixup 294969c6: do not forget to update metrics --- diff --git a/src/BufferView.cpp b/src/BufferView.cpp index e31efcf673..9430ba4632 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -528,12 +528,15 @@ void BufferView::processUpdateFlags(Update::flags flags) // First try to make the selection start visible // (which is just the cursor when there is no selection) scrollToCursor(d->cursor_.selectionBegin(), false); + // Metrics have to be recomputed (maybe again) + updateMetrics(); // Is the cursor visible? (only useful if cursor is at end of selection) - if (needsFitCursor()) + if (needsFitCursor()) { // then try to make cursor visible instead scrollToCursor(d->cursor_, false); - // Metrics have to be recomputed (maybe again) - updateMetrics(flags); + // Metrics have to be recomputed (maybe again) + updateMetrics(flags); + } } flags = flags & ~Update::FitCursor; }