1
0
forked from aniani/vim

patch 9.1.0280: several issues with 'smoothscroll' support

Problem:  Logic to make sure cursor is in visible part of the screen after
          scrolling the text with 'smoothscroll' is scattered, asymmetric
          and contains bugs.
Solution: Adjust and create helper function for 'smoothscroll' cursor logic.
          (Luuk van Baal)

closes: #14410

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Luuk van Baal
2024-04-08 22:27:41 +02:00
committed by Christian Brabandt
parent 196b6678c5
commit 9148ba8a46
10 changed files with 217 additions and 191 deletions

View File

@@ -519,6 +519,8 @@ plines_m_win(win_T *wp, linenr_T first, linenr_T last, int limit_winheight)
#endif
{
#ifdef FEAT_DIFF
if (first == wp->w_buffer->b_ml.ml_line_count)
count += diff_check_fill(wp, first + 1);
if (first == wp->w_topline)
count += plines_win_nofill(wp, first, limit_winheight)
+ wp->w_topfill;