diff options
author | 2016-10-15 23:06:39 +0000 | |
---|---|---|
committer | 2016-10-15 23:06:39 +0000 | |
commit | ca74fffff027096ee666ac5b0d62042d10518777 (patch) | |
tree | 23cbe92fbab67f463aa8c56fe0af997e5d51c9bd /usr.bin/tmux/cmd-run-shell.c | |
parent | Quiet compiler warnings. OK tomc@ tb@ (diff) | |
download | wireguard-openbsd-ca74fffff027096ee666ac5b0d62042d10518777.tar.xz wireguard-openbsd-ca74fffff027096ee666ac5b0d62042d10518777.zip |
Only use pane with run-shell if -t is given.
Diffstat (limited to 'usr.bin/tmux/cmd-run-shell.c')
-rw-r--r-- | usr.bin/tmux/cmd-run-shell.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-run-shell.c b/usr.bin/tmux/cmd-run-shell.c index d4a589f9ad3..e1f4795b506 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.38 2016/10/10 21:51:39 nicm Exp $ */ +/* $OpenBSD: cmd-run-shell.c,v 1.39 2016/10/15 23:06:39 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org> @@ -100,7 +100,11 @@ cmd_run_shell_exec(struct cmd *self, struct cmd_q *cmdq) cdata = xcalloc(1, sizeof *cdata); cdata->cmd = shellcmd; cdata->bflag = args_has(args, 'b'); - cdata->wp_id = wp != NULL ? (int) wp->id : -1; + + if (args_has(args, 't') && wp != NULL) + cdata->wp_id = wp->id; + else + cdata->wp_id = -1; cdata->cmdq = cmdq; cmdq->references++; |