summaryrefslogtreecommitdiffstats
path: root/cfg.c
diff options
context:
space:
mode:
authornicm <nicm>2019-03-08 10:34:20 +0000
committernicm <nicm>2019-03-08 10:34:20 +0000
commitde730f68a4bc97e26f8f5dcb404ed27dc489c0fd (patch)
treee55ae16a116c303ea67fa8daf0f85172828c5374 /cfg.c
parent9cc04a0f9a62c5f4d9e643538f0f866115d6b16d (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 'cfg.c')
-rw-r--r--cfg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cfg.c b/cfg.c
index 0842f638..fc7e345c 100644
--- a/cfg.c
+++ b/cfg.c
@@ -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]);