summaryrefslogtreecommitdiffstats
path: root/cmd-run-shell.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 /cmd-run-shell.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 'cmd-run-shell.c')
-rw-r--r--cmd-run-shell.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd-run-shell.c b/cmd-run-shell.c
index 998ffcd8..8e99f90b 100644
--- a/cmd-run-shell.c
+++ b/cmd-run-shell.c
@@ -75,7 +75,10 @@ cmd_run_shell_print(struct job *job, const char *msg)
return;
}
- 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);
+ }
window_copy_add(wp, "%s", msg);
}