summaryrefslogtreecommitdiffstats
path: root/src/drawscreen.c
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2023-05-06 12:40:15 +0100
committerBram Moolenaar <Bram@vim.org>2023-05-06 12:40:15 +0100
commitc8502f9b880b6d23baa4f9d28b60e1ceb442e35f (patch)
treee87ae73d24b972095f15d83fef32115361526e29 /src/drawscreen.c
parent12e7a1fe7527e9e59adbe248a95b4b532e3ec58c (diff)
patch 9.0.1512: inserting lines when scrolling with 'smoothscroll' setv9.0.1512
Problem: Inserting lines when scrolling with 'smoothscroll' set. Solution: Adjust line height computation for w_skipcol. (Luuk van Baal, closes #12350)
Diffstat (limited to 'src/drawscreen.c')
-rw-r--r--src/drawscreen.c10
1 files changed, 8 insertions, 2 deletions
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);