resize: bug: we're not in alt screen mode at startup

When we start up, the cells pointer, *and* the alt screen pointer are
both NULL. Hence we incorrectly decided we were initially in alt
screen mode.
This commit is contained in:
Daniel Eklöf 2019-06-23 17:14:46 +02:00
parent de7dcf1a5c
commit c0a9f9e6b2
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

3
main.c
View file

@ -355,7 +355,8 @@ resize(struct context *c, int width, int height)
if (width == c->width && height == c->height)
return;
bool alt_screen_active = c->term.grid.cells == c->term.grid.alt_grid;
bool alt_screen_active
= c->term.grid.cells != NULL && c->term.grid.cells == c->term.grid.alt_grid;
c->width = width;
c->height = height;