diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-02-07 13:05:25 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2019-02-07 17:56:02 +0100 |
commit | be8058cfe4b7adff60a68d9503a01e322d7d2ff9 (patch) | |
tree | 00be473f5509a9cc085a64ab29b0fadb9f9412b3 /src/nvim/move.c | |
parent | 6e9ea5adcea9efc4e1423d6a7e88dbb8e5296331 (diff) | |
download | rneovim-be8058cfe4b7adff60a68d9503a01e322d7d2ff9.tar.gz rneovim-be8058cfe4b7adff60a68d9503a01e322d7d2ff9.tar.bz2 rneovim-be8058cfe4b7adff60a68d9503a01e322d7d2ff9.zip |
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.
Diffstat (limited to 'src/nvim/move.c')
-rw-r--r-- | src/nvim/move.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c index 869b877b02..7aa7f922c1 100644 --- a/src/nvim/move.c +++ b/src/nvim/move.c @@ -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; |