0
0
mirror of https://github.com/vim/vim.git synced 2025-11-16 23:24:03 -05:00

patch 9.1.1883: Wrong display with 'smoothscroll' with -diff

Problem:  Wrong display with 'smoothscroll' when FEAT_DIFF is disabled.
Solution: Use plines_correct_topline() (zeertzjq).

closes: #18649

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq
2025-10-28 19:03:22 +00:00
committed by Christian Brabandt
parent 21ef3c6e59
commit e06e70f7b1
5 changed files with 11 additions and 25 deletions

View File

@@ -1919,13 +1919,8 @@ win_update(win_T *wp)
// Correct the first entry for filler lines at the top
// when it won't get updated below.
if (wp->w_p_diff && bot_start > 0)
{
int n = plines_win_nofill(wp, wp->w_topline, FALSE)
+ wp->w_topfill - adjust_plines_for_skipcol(wp);
if (n > wp->w_height)
n = wp->w_height;
wp->w_lines[0].wl_size = n;
}
wp->w_lines[0].wl_size = plines_correct_topline(wp,
wp->w_topline, TRUE);
#endif
}
}
@@ -2342,21 +2337,7 @@ win_update(win_T *wp)
++new_rows;
else
#endif
{
#ifdef FEAT_DIFF
if (l == wp->w_topline)
{
int n = plines_win_nofill(wp, l, FALSE)
+ wp->w_topfill;
n -= adjust_plines_for_skipcol(wp);
if (n > wp->w_height)
n = wp->w_height;
new_rows += n;
}
else
#endif
new_rows += plines_win(wp, l, TRUE);
}
new_rows += plines_correct_topline(wp, l, TRUE);
++j;
if (new_rows > wp->w_height - row - 2)
{