diff options
Diffstat (limited to 'src/nvim/move.c')
-rw-r--r-- | src/nvim/move.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c index 3a29851ee6..bb44b458e8 100644 --- a/src/nvim/move.c +++ b/src/nvim/move.c @@ -149,9 +149,12 @@ void update_topline(void) bool check_botline = false; long save_so = p_so; + // need to have w_grid.Rows/Columns updated + win_grid_alloc(curwin, false); + // 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 == 0) { + if (!screen_valid(true) || curwin->w_grid.Rows == 0) { curwin->w_topline = curwin->w_cursor.lnum; curwin->w_botline = curwin->w_topline; curwin->w_valid |= VALID_BOTLINE|VALID_BOTLINE_AP; |