summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cfg.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2019-03-08 10:34:21 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2019-03-08 10:34:21 +0000
commitf70bfd248e2b991bcfb01c7cc241ec2579d1735a (patch)
tree60784a988d2167dca3999d18a11233837191d8ea /usr.bin/tmux/cfg.c
parent08fcb5243af030539f5557e00a9886a2fc0c2236 (diff)
Make the mode used to view command output (a variant of copy mode) use
its own mode definition struct with a different init function rather than calling special setup functions.
Diffstat (limited to 'usr.bin/tmux/cfg.c')
-rw-r--r--usr.bin/tmux/cfg.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/tmux/cfg.c b/usr.bin/tmux/cfg.c
index 4e7811092ac..2535a464066 100644
--- a/usr.bin/tmux/cfg.c
+++ b/usr.bin/tmux/cfg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cfg.c,v 1.64 2019/03/07 19:34:22 nicm Exp $ */
+/* $OpenBSD: cfg.c,v 1.65 2019/03/08 10:34:20 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -348,7 +348,10 @@ cfg_show_causes(struct session *s)
return;
wp = s->curw->window->active;
- window_copy_init_for_output(wp);
+ if (wp->mode == NULL || wp->mode->mode != &window_view_mode) {
+ window_pane_reset_mode(wp);
+ window_pane_set_mode(wp, &window_view_mode, NULL, NULL);
+ }
for (i = 0; i < cfg_ncauses; i++) {
window_copy_add(wp, "%s", cfg_causes[i]);
free(cfg_causes[i]);