diff options
author | nicm <nicm> | 2020-04-18 15:12:28 +0000 |
---|---|---|
committer | nicm <nicm> | 2020-04-18 15:12:28 +0000 |
commit | ea5fdd5331d74d305cbb61b8f47a2054fc2052fb (patch) | |
tree | ebe52901160914249989cc202cae7b300f55e5bc /screen.c | |
parent | 4a93294152efb921bb5bada71164c47a57518e31 (diff) |
There is no point in keeping a bunch of different text buffers for each
line when writing, we only need one as big as the line width - there
can't be any more text than that since newer will overwrite older.
Diffstat (limited to 'screen.c')
-rw-r--r-- | screen.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -85,6 +85,8 @@ screen_init(struct screen *s, u_int sx, u_int sy, u_int hlimit) s->tabs = NULL; s->sel = NULL; + s->write_list = NULL; + screen_reinit(s); } @@ -122,6 +124,9 @@ screen_free(struct screen *s) free(s->title); free(s->ccolour); + if (s->write_list != NULL) + screen_write_free_list(s); + if (s->saved_grid != NULL) grid_destroy(s->saved_grid); grid_destroy(s->grid); @@ -222,6 +227,11 @@ screen_resize_cursor(struct screen *s, u_int sx, u_int sy, int reflow, { u_int tcx, tcy; + if (s->write_list != NULL) { + screen_write_free_list(s); + s->write_list = NULL; + } + if (cx == NULL) cx = &tcx; *cx = s->cx; |