diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2016-11-12 19:05:54 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2016-11-12 19:05:54 +0000 |
commit | f2c72980bdee290aabcaabeb7f15f47438a73b29 (patch) | |
tree | bb2fb144cfc1f41471126161ff0bbdca76330699 /usr.bin/tmux | |
parent | 286a8745a81f6f50d93d28741f87ed918821b9f1 (diff) |
Apply the right fix for run -b, used the wrong diff before.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/cmd-run-shell.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/usr.bin/tmux/cmd-run-shell.c b/usr.bin/tmux/cmd-run-shell.c index d83f5620b92..8006a324ece 100644 --- a/usr.bin/tmux/cmd-run-shell.c +++ b/usr.bin/tmux/cmd-run-shell.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-run-shell.c,v 1.42 2016/11/11 11:37:25 nicm Exp $ */ +/* $OpenBSD: cmd-run-shell.c,v 1.43 2016/11/12 19:05:53 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org> @@ -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) |