From 1ff1b3a71e8edcad62c98a3c80b6e1d8a77bc26f Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 10 Jul 2019 16:27:55 +0200 Subject: grid: don't pre-allocate the entire grid (with all scrollback lines) The row array may now contain NULL pointers. This means the corresponding row hasn't yet been allocated and initialized. On a resize, we explicitly allocate the visible rows. Uninitialized rows are then allocated the first time they are referenced. --- terminal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'terminal.h') diff --git a/terminal.h b/terminal.h index f5e2cfa9..4ddf017e 100644 --- a/terminal.h +++ b/terminal.h @@ -94,11 +94,11 @@ struct damage { struct row { struct cell *cells; bool dirty; - bool initialized; }; struct grid { int num_rows; + int num_cols; int offset; int view; -- cgit v1.3