diff options
author | Daniel Hahler <git@thequod.de> | 2019-09-18 18:22:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-18 18:22:38 +0200 |
commit | 1070c092c7bf989f261047b861165e61e94c1941 (patch) | |
tree | d1165f1b04efc8bc52dacbfc4d5cd73d044f5771 /src | |
parent | d4785421106c9ac81adc9ddd5778446d80dbc4ba (diff) | |
download | rneovim-1070c092c7bf989f261047b861165e61e94c1941.tar.gz rneovim-1070c092c7bf989f261047b861165e61e94c1941.tar.bz2 rneovim-1070c092c7bf989f261047b861165e61e94c1941.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/screen.c | 2 |
1 files changed, 1 insertions, 1 deletions
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. |