From c8502f9b880b6d23baa4f9d28b60e1ceb442e35f Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Sat, 6 May 2023 12:40:15 +0100 Subject: patch 9.0.1512: inserting lines when scrolling with 'smoothscroll' set Problem: Inserting lines when scrolling with 'smoothscroll' set. Solution: Adjust line height computation for w_skipcol. (Luuk van Baal, closes #12350) --- src/drawscreen.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/drawscreen.c') diff --git a/src/drawscreen.c b/src/drawscreen.c index 13892bb7ca..a07c176d03 100644 --- a/src/drawscreen.c +++ b/src/drawscreen.c @@ -2327,8 +2327,14 @@ win_update(win_T *wp) { #ifdef FEAT_DIFF if (l == wp->w_topline) - new_rows += plines_win_nofill(wp, l, TRUE) - + wp->w_topfill; + { + int n = plines_win_nofill(wp, l, FALSE) + + wp->w_topfill; + n = adjust_plines_for_skipcol(wp, n); + if (n > wp->w_height) + n = wp->w_height; + new_rows += n; + } else #endif new_rows += plines_win(wp, l, TRUE); -- cgit v1.2.3