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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd-run-shell.c b/cmd-run-shell.c
index 8e99f90b..c9a478c7 100644
--- a/cmd-run-shell.c
+++ b/cmd-run-shell.c
@@ -60,6 +60,7 @@ cmd_run_shell_print(struct job *job, const char *msg)
struct cmd_run_shell_data *cdata = job_get_data(job);
struct window_pane *wp = NULL;
struct cmd_find_state fs;
+ struct window_mode_entry *wme;
if (cdata->wp_id != -1)
wp = window_pane_find_by_id(cdata->wp_id);
@@ -75,10 +76,9 @@ cmd_run_shell_print(struct job *job, const char *msg)
return;
}
- if (wp->mode == NULL || wp->mode->mode != &window_view_mode) {
- window_pane_reset_mode(wp);
+ wme = TAILQ_FIRST(&wp->modes);
+ if (wme == NULL || wme->mode != &window_view_mode)
window_pane_set_mode(wp, &window_view_mode, NULL, NULL);
- }
window_copy_add(wp, "%s", msg);
}