summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2019-03-18 21:55:04 +0000
committernicm <nicm>2019-03-18 21:55:04 +0000
commit0406ec0ec29f6dd7b8ea663f50d766bce5904c78 (patch)
treeaa0b5e2050cc60c463f39597f914ebfe3d6147b2
parentf34ebfed7698ce41fe7bae756c0bb0c485e8bfdb (diff)
Free temporary screens when writing format.
-rw-r--r--format-draw.c8
-rw-r--r--window.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/format-draw.c b/format-draw.c
index 52292c98..a3bd4351 100644
--- a/format-draw.c
+++ b/format-draw.c
@@ -694,8 +694,10 @@ format_draw(struct screen_write_ctx *octx, const struct grid_cell *base,
}
free(fr);
- for (i = 0; i < TOTAL; i++)
+ for (i = 0; i < TOTAL; i++) {
+ screen_write_stop(&ctx[i]);
log_debug("%s: width %s is %u", __func__, names[i], width[i]);
+ }
if (focus_start != -1 && focus_end != -1)
log_debug("focus is %d-%d", focus_start, focus_end);
TAILQ_FOREACH(fr, &frs, entry) {
@@ -748,6 +750,10 @@ format_draw(struct screen_write_ctx *octx, const struct grid_cell *base,
format_free_range(&frs, fr);
}
+ /* Free the screens. */
+ for (i = 0; i < TOTAL; i++)
+ screen_free(&s[i]);
+
/* Restore the original cursor position. */
screen_write_cursormove(octx, ocx, ocy, 0);
}
diff --git a/window.c b/window.c
index 8539c9ca..3ec5d504 100644
--- a/window.c
+++ b/window.c
@@ -864,6 +864,8 @@ window_pane_destroy(struct window_pane *wp)
input_free(wp);
+ screen_free(&wp->status_screen);
+
screen_free(&wp->base);
if (wp->saved_grid != NULL)
grid_destroy(wp->saved_grid);