Fixup 1cbbe5c3: fix scrollbar with page down

It turns out that the fix was not correct. The right thing to do is to
recompte metrics only when screen has moved.

Fixes bug #12144.
This commit is contained in:
Jean-Marc Lasgouttes 2021-11-13 19:24:05 +01:00
parent 3aab9ad25e
commit 741d055eba

View File

@ -1909,7 +1909,8 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
cur.setCursor(doc_iterator_begin(cur.buffer()));
cur.selHandle(false);
// Force an immediate computation of metrics because we need it below
updateMetrics();
if (scrolled)
processUpdateFlags(Update::Force);
d->text_metrics_[&buffer_.text()].editXY(cur, p.x_, p.y_,
true, act == LFUN_SCREEN_UP);