aboutsummaryrefslogtreecommitdiff
path: root/cmd-run-shell.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2016-10-16 02:01:11 +0100
committerThomas Adam <thomas@xteddy.org>2016-10-16 02:01:11 +0100
commit3d8efdf310f475a6b9ed83814182c966de2bdab3 (patch)
tree54277624e0103b676f305a71b9d3eb5906ed6e80 /cmd-run-shell.c
parenta15939b502a0cc44272fe4c84057faa3647c871d (diff)
parentbfe14b531267f3762a518f98b72a3148a134396a (diff)
downloadrtmux-3d8efdf310f475a6b9ed83814182c966de2bdab3.tar.gz
rtmux-3d8efdf310f475a6b9ed83814182c966de2bdab3.tar.bz2
rtmux-3d8efdf310f475a6b9ed83814182c966de2bdab3.zip
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-run-shell.c')
-rw-r--r--cmd-run-shell.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd-run-shell.c b/cmd-run-shell.c
index 55c98ad3..c81c76f8 100644
--- a/cmd-run-shell.c
+++ b/cmd-run-shell.c
@@ -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++;