aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/drawscreen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/drawscreen.c')
-rw-r--r--src/nvim/drawscreen.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/drawscreen.c b/src/nvim/drawscreen.c
index 025d8fe721..aa5c66465b 100644
--- a/src/nvim/drawscreen.c
+++ b/src/nvim/drawscreen.c
@@ -1805,8 +1805,10 @@ static void win_update(win_T *wp)
// Correct the first entry for filler lines at the top
// when it won't get updated below.
if (win_may_fill(wp) && bot_start > 0) {
- wp->w_lines[0].wl_size = (uint16_t)(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);
+ n = MIN(n, wp->w_height_inner);
+ wp->w_lines[0].wl_size = (uint16_t)n;
}
}
}