From 1070c092c7bf989f261047b861165e61e94c1941 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 18 Sep 2019 18:22:38 +0200 Subject: win_update: fix redraw regression (#11027) Before 6e9ea5adc `win_ins_lines` would return `FAIL` for `i/line_count == 0`. Handle this by checking it in the outer `if`. Ref: https://github.com/neovim/neovim/commit/6e9ea5ad#commitcomment-35084669 --- src/nvim/screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 5bcd2c808d..25dd3aad7e 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -871,7 +871,7 @@ static void win_update(win_T *wp) if (wp->w_lines[0].wl_lnum != wp->w_topline) i += diff_check_fill(wp, wp->w_lines[0].wl_lnum) - wp->w_old_topfill; - if (i < wp->w_grid.Rows - 2) { // less than a screen off + if (i != 0 && i < wp->w_grid.Rows - 2) { // less than a screen off // Try to insert the correct number of lines. // If not the last window, delete the lines at the bottom. // win_ins_lines may fail when the terminal can't do it. -- cgit