summaryrefslogtreecommitdiffstats
path: root/cmd-clear-history.c
diff options
context:
space:
mode:
authornicm <nicm>2015-09-25 15:53:07 +0000
committernicm <nicm>2015-09-25 15:53:07 +0000
commit28f23f18e9d79405a60348c4f7aeded33da9135b (patch)
tree0fbd5c6742b4cb4f46bd434d3ce291e486078bc5 /cmd-clear-history.c
parent2a62917444783e62ea5b8c13069aecb77b47ff07 (diff)
Free the history when it is cleared, based on a diff from Carlo Cannas.
Diffstat (limited to 'cmd-clear-history.c')
-rw-r--r--cmd-clear-history.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/cmd-clear-history.c b/cmd-clear-history.c
index 88dbbcf7..63e9d548 100644
--- a/cmd-clear-history.c
+++ b/cmd-clear-history.c
@@ -47,9 +47,7 @@ cmd_clear_history_exec(struct cmd *self, struct cmd_q *cmdq)
if (wp->mode == &window_copy_mode)
window_pane_reset_mode(wp);
-
- grid_move_lines(gd, 0, gd->hsize, gd->sy);
- gd->hsize = 0;
+ grid_clear_history(gd);
return (CMD_RETURN_NORMAL);
}