mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 11:18:19 +00:00
screen: initialize screen properly with early set display-=msgsep
Currently `nvim -u NORC --cmd "set display-=msgsep"` will still allocate the message grid and remove it just afterwards. While inefficient, we must make sure update_screen() re-validates the default_grid completely when this happens. Fix some invalid logic: don't reallocate msg_grid on resize when the grid is not used. Elide a too early ui_flush() on startup, which caused an invalid cursor position to be used.
This commit is contained in:
@@ -404,7 +404,7 @@ int update_screen(int type)
|
||||
default_grid.valid = true;
|
||||
}
|
||||
|
||||
if (type == NOT_VALID && msg_dothrottle()) {
|
||||
if (type == NOT_VALID && (msg_dothrottle() || msg_grid.chars)) {
|
||||
grid_fill(&default_grid, Rows-p_ch, Rows, 0, Columns, ' ', ' ', 0);
|
||||
}
|
||||
|
||||
@@ -7288,9 +7288,9 @@ void screen_resize(int width, int height)
|
||||
}
|
||||
}
|
||||
}
|
||||
ui_flush();
|
||||
}
|
||||
ui_flush();
|
||||
--busy;
|
||||
busy--;
|
||||
}
|
||||
|
||||
/// Check if the new Nvim application "shell" dimensions are valid.
|
||||
|
Reference in New Issue
Block a user