From 937173ff110601d7ff44254ec57b4389d5c24994 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 29 Jan 2012 21:31:11 +0000 Subject: [PATCH] Enforce history-limit option when clearing the screen, memory leak spotted by R I Pienaar. --- grid-view.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/grid-view.c b/grid-view.c index 075feb6b..e36144f0 100644 --- a/grid-view.c +++ b/grid-view.c @@ -94,8 +94,10 @@ grid_view_clear_history(struct grid *gd) return; /* Scroll the lines into the history. */ - for (yy = 0; yy < last; yy++) + for (yy = 0; yy < last; yy++) { + grid_collect_history(gd); grid_scroll_history(gd); + } } /* Clear area. */