render: last_buf may point to a free:d buffer

So, store last buf's width/height separately
This commit is contained in:
Daniel Eklöf 2019-11-02 00:48:07 +01:00
parent 5812242405
commit 4d3251a93b
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 23 additions and 9 deletions

View file

@ -276,7 +276,11 @@ struct terminal {
struct cell *cell; /* For easy access to content */
} last_cursor;
struct buffer *last_buf; /* Buffer we rendered to last time */
struct {
struct buffer *buf; /* Buffer we rendered to last time */
int width;
int height;
} last_shm;
bool was_flashing; /* Flash was active last time we rendered */
bool was_searching;
} render;