mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 11:18:19 +00:00
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
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user