summaryrefslogtreecommitdiffstats
path: root/cmd-clear-history.c
diff options
context:
space:
mode:
authornicm <nicm>2017-01-10 19:45:55 +0000
committernicm <nicm>2017-01-10 19:45:55 +0000
commit55266275587f3bb6f0dfdb1623cb870315a38213 (patch)
treebee559503005765cb3da3e3deb2c97bc18c76bfb /cmd-clear-history.c
parentaa4de2d4b29fc7bdb15a207d44682a173ab874b6 (diff)
Minor tidying in a couple of commands.
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);
}