From c0a9f9e6b2519f70c98c217ba946d5ddca8a367b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 23 Jun 2019 17:14:46 +0200 Subject: [PATCH] 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. --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index d5786cc3..5a2dbc93 100644 --- a/main.c +++ b/main.c @@ -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;