summaryrefslogtreecommitdiffstats
path: root/cmd-clear-history.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-clear-history.c')
-rw-r--r--cmd-clear-history.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/cmd-clear-history.c b/cmd-clear-history.c
index 1afd9053..b5e0f84f 100644
--- a/cmd-clear-history.c
+++ b/cmd-clear-history.c
@@ -44,13 +44,10 @@ static enum cmd_retval
cmd_clear_history_exec(__unused struct cmd *self, struct cmdq_item *item)
{
struct window_pane *wp = item->state.tflag.wp;
- struct grid *gd;
-
- gd = item->state.tflag.wp->base.grid;
if (wp->mode == &window_copy_mode)
window_pane_reset_mode(wp);
- grid_clear_history(gd);
+ grid_clear_history(wp->base.grid);
return (CMD_RETURN_NORMAL);
}