From 0292d916408c92c255b9df87f9f0c763ca80a475 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 17 Jul 2019 17:49:23 +0000 Subject: Use the right client for if -b. --- usr.bin/tmux/cmd-if-shell.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'usr.bin/tmux/cmd-if-shell.c') diff --git a/usr.bin/tmux/cmd-if-shell.c b/usr.bin/tmux/cmd-if-shell.c index 0f75678a165..e021ba6d35e 100644 --- a/usr.bin/tmux/cmd-if-shell.c +++ b/usr.bin/tmux/cmd-if-shell.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-if-shell.c,v 1.64 2019/06/18 11:08:42 nicm Exp $ */ +/* $OpenBSD: cmd-if-shell.c,v 1.65 2019/07/17 17:49:23 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha @@ -121,7 +121,10 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item) cdata->cmd_else = NULL; memcpy(&cdata->mouse, m, sizeof cdata->mouse); - cdata->client = item->client; + if (!args_has(args, 'b')) + cdata->client = item->client; + else + cdata->client = c; if (cdata->client != NULL) cdata->client->references++; -- cgit v1.2.3-59-g8ed1b