mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 19:06:31 +00:00
fix(ui): make sure screen is valid after resizing
Problem: When not inside an Ex command, screen_resize() calls update_screen(), which calls screenclear() and set the screen as valid. However, when inside an Ex command, redrawing is postponed so update_screen() screen doesn't do anything, and the screen is still invalid after the resize, causing ui_comp_raw_line() to be no-op until update_screen() is called on the main loop. Solution: Restore the call to screenclear() inside screen_resize() so that the screen is invalid after screen_resize(). Since screenclear() changes redraw type from UPD_CLEAR to UPD_NOT_VALID, it is called at most once for each resize, so this shouldn't change how much code is run in the common (not inside an Ex command) case.
This commit is contained in:
@@ -318,6 +318,10 @@ void screen_resize(int width, int height)
|
||||
resizing_autocmd = false;
|
||||
redraw_all_later(UPD_CLEAR);
|
||||
|
||||
if (State != MODE_ASKMORE && State != MODE_EXTERNCMD && State != MODE_CONFIRM) {
|
||||
screenclear();
|
||||
}
|
||||
|
||||
if (starting != NO_SCREEN) {
|
||||
maketitle();
|
||||
|
||||
|
Reference in New Issue
Block a user