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)
diff --git a/src/move.c b/src/move.c
index 77d8b5f..54164a3 100644
--- a/src/move.c
+++ b/src/move.c
@@ -38,7 +38,7 @@
/*
* Reduce "n" for the screen lines skipped with "wp->w_skipcol".
*/
- static int
+ int
adjust_plines_for_skipcol(win_T *wp, int n)
{
if (wp->w_skipcol == 0)
@@ -239,7 +239,7 @@
}
/*
- * Set curwin->s_skipcol to zero and redraw later if needed.
+ * Set curwin->w_skipcol to zero and redraw later if needed.
*/
static void
reset_skipcol(void)
@@ -2990,7 +2990,7 @@
if (curwin->w_p_sms && !curwin->w_p_wrap)
{
- // 'smoothscroll is active
+ // 'smoothscroll' is active
if (curwin->w_cline_height == curwin->w_height)
{
// The cursor line just fits in the window, don't scroll.