summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-capture-pane.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2019-03-07 20:24:21 +0000
committernicm <nicm@openbsd.org>2019-03-07 20:24:21 +0000
commit30a94f4585db9f50fb6a1c23caadbbef26c4afb1 (patch)
tree5acdc4f9378c915db3f7695fec401a063aec6e0a /usr.bin/tmux/cmd-capture-pane.c
parentTidy changing the mode into window_copy_init_for_output. (diff)
downloadwireguard-openbsd-30a94f4585db9f50fb6a1c23caadbbef26c4afb1.tar.xz
wireguard-openbsd-30a94f4585db9f50fb6a1c23caadbbef26c4afb1.zip
Add a separate mode struct for the active window mode if any.
Diffstat (limited to 'usr.bin/tmux/cmd-capture-pane.c')
-rw-r--r--usr.bin/tmux/cmd-capture-pane.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-capture-pane.c b/usr.bin/tmux/cmd-capture-pane.c
index ac66d2fa40a..5d094f3014d 100644
--- a/usr.bin/tmux/cmd-capture-pane.c
+++ b/usr.bin/tmux/cmd-capture-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-capture-pane.c,v 1.44 2017/04/22 10:22:39 nicm Exp $ */
+/* $OpenBSD: cmd-capture-pane.c,v 1.45 2019/03/07 20:24:21 nicm Exp $ */
/*
* Copyright (c) 2009 Jonathan Alvarado <radobobo@users.sourceforge.net>
@@ -199,7 +199,7 @@ cmd_capture_pane_exec(struct cmd *self, struct cmdq_item *item)
size_t len;
if (self->entry == &cmd_clear_history_entry) {
- if (wp->mode == &window_copy_mode)
+ if (wp->mode != NULL && wp->mode->mode == &window_copy_mode)
window_pane_reset_mode(wp);
grid_clear_history(wp->base.grid);
return (CMD_RETURN_NORMAL);