Free the history when it is cleared, based on a diff from Carlo Cannas.

This commit is contained in:
nicm
2015-09-25 15:53:07 +00:00
parent 2a62917444
commit 28f23f18e9
3 changed files with 18 additions and 7 deletions

View File

@ -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);
}