summaryrefslogtreecommitdiffstats
path: root/cmd-run-shell.c
diff options
context:
space:
mode:
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);
}