Restore some checks that were useful for search

It is really back of the enveloppe spacing, but people liked it this way.

Fixes ticket #12767.
This commit is contained in:
Jean-Marc Lasgouttes 2023-07-26 21:13:51 +02:00 committed by Pavel Sanda
parent 926ae84921
commit 7f23bd4aca

View File

@ -1079,6 +1079,11 @@ bool BufferView::scrollToCursor(DocIterator const & dit, ScrollType how)
d->anchor_ypos_ += height_/2 - row_dim.height() / 2;
else if (!lyxrc.scroll_below_document && d->anchor_pit_ == max_pit)
d->anchor_ypos_ = height_ - offset - row_dim.descent();
else if (offset > height_)
d->anchor_ypos_ = height_ - offset - defaultRowHeight();
else
d->anchor_ypos_ = defaultRowHeight() * 2;
return d->anchor_ypos_ != old_ypos || d->anchor_pit_ != old_pit;
}