patch 9.1.0753: Wrong display when typing in diff mode with 'smoothscroll'
Problem: Wrong display when typing in diff mode with 'smoothscroll'.
Solution: Use adjust_plines_for_skipcol() (zeertzjq).
closes: #15776
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/drawscreen.c b/src/drawscreen.c
index 1802ade..cf2e4c1 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -1906,9 +1906,13 @@
// 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)
- wp->w_lines[0].wl_size =
- plines_win_nofill(wp, wp->w_topline, TRUE)
- + wp->w_topfill;
+ {
+ 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;
+ }
#endif
}
}