mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 07:48:18 +00:00
screen: cleanup allocation, clearing and validation
grid_xx functions shouldn't randomly be called when the screen is not valid. Nvim deterministically initializes a default screen early in main(), so the default grid can be assumed to be allocated.
This commit is contained in:
@@ -152,7 +152,7 @@ void update_topline(void)
|
||||
|
||||
// If there is no valid screen and when the window height is zero just use
|
||||
// the cursor line.
|
||||
if (!screen_valid(true) || curwin->w_height_inner == 0) {
|
||||
if (!default_grid.chars || curwin->w_height_inner == 0) {
|
||||
curwin->w_topline = curwin->w_cursor.lnum;
|
||||
curwin->w_botline = curwin->w_topline;
|
||||
curwin->w_valid |= VALID_BOTLINE|VALID_BOTLINE_AP;
|
||||
|
Reference in New Issue
Block a user