summaryrefslogtreecommitdiffstats
path: root/cmd-run-shell.c
diff options
context:
space:
mode:
authornicm <nicm>2016-11-12 19:05:53 +0000
committernicm <nicm>2016-11-12 19:05:53 +0000
commitdb2412e2ace3fbb9f0587672ae8bd1e57ba4efd1 (patch)
treeeb3dab0d03c01e0f33b47dc8ce6628b1267ec191 /cmd-run-shell.c
parentb7398a49188b5b08ea72932454f31ef96970c3bc (diff)
Apply the right fix for run -b, used the wrong diff before.
Diffstat (limited to 'cmd-run-shell.c')
-rw-r--r--cmd-run-shell.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/cmd-run-shell.c b/cmd-run-shell.c
index 08f6120a..e5726b26 100644
--- a/cmd-run-shell.c
+++ b/cmd-run-shell.c
@@ -59,12 +59,20 @@ cmd_run_shell_print(struct job *job, const char *msg)
{
struct cmd_run_shell_data *cdata = job->data;
struct window_pane *wp = NULL;
+ struct cmd_find_state fs;
if (cdata->wp_id != -1)
wp = window_pane_find_by_id(cdata->wp_id);
- if (cdata->item != NULL && wp == NULL) {
- cmdq_print(cdata->item, "%s", msg);
- return;
+ if (wp == NULL) {
+ if (cdata->item != NULL) {
+ cmdq_print(cdata->item, "%s", msg);
+ return;
+ }
+ if (cmd_find_current (&fs, NULL, CMD_FIND_QUIET) != 0)
+ return;
+ wp = fs.wp;
+ if (wp == NULL)
+ return;
}
if (window_pane_set_mode(wp, &window_copy_mode) == 0)