diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2012-01-29 21:31:11 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2012-01-29 21:31:11 +0000 |
commit | 937173ff110601d7ff44254ec57b4389d5c24994 (patch) | |
tree | e1b61e1cdb14f91496773703a30300889a47836a | |
parent | 230d0fbc9e273a171e811f58b540163fe871df5e (diff) | |
download | rtmux-937173ff110601d7ff44254ec57b4389d5c24994.tar.gz rtmux-937173ff110601d7ff44254ec57b4389d5c24994.tar.bz2 rtmux-937173ff110601d7ff44254ec57b4389d5c24994.zip |
Enforce history-limit option when clearing the screen, memory leak
spotted by R I Pienaar.
-rw-r--r-- | grid-view.c | 4 |
1 files changed, 3 insertions, 1 deletions
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. */ |