From de730f68a4bc97e26f8f5dcb404ed27dc489c0fd Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 8 Mar 2019 10:34:20 +0000 Subject: 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. --- cmd-run-shell.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cmd-run-shell.c') 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); } -- cgit