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:
Björn Linse
2019-02-07 13:05:25 +01:00
parent 6e9ea5adce
commit be8058cfe4
4 changed files with 17 additions and 35 deletions

View File

@@ -946,9 +946,9 @@ void wait_return(int redraw)
c = CAR; /* no need for a return in ex mode */
got_int = FALSE;
} else {
/* Make sure the hit-return prompt is on screen when 'guioptions' was
* just changed. */
screenalloc(false);
// Make sure the hit-return prompt is on screen when 'guioptions' was
// just changed.
screenalloc();
State = HITRETURN;
setmouse();