=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-if-shell.c,v retrieving revision 1.73 retrieving revision 1.74 diff -c -r1.73 -r1.74 *** src/usr.bin/tmux/cmd-if-shell.c 2020/04/13 18:59:41 1.73 --- src/usr.bin/tmux/cmd-if-shell.c 2020/04/13 20:51:57 1.74 *************** *** 1,4 **** ! /* $OpenBSD: cmd-if-shell.c,v 1.73 2020/04/13 18:59:41 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha --- 1,4 ---- ! /* $OpenBSD: cmd-if-shell.c,v 1.74 2020/04/13 20:51:57 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha *************** *** 67,78 **** struct cmd_if_shell_data *cdata; char *shellcmd, *cmd, *error; const char *file; ! struct client *c = cmd_find_client(item, NULL, 1); struct session *s = target->s; struct cmd_parse_input pi; enum cmd_parse_status status; ! shellcmd = format_single_from_target(item, args->argv[0], c); if (args_has(args, 'F')) { if (*shellcmd != '0' && *shellcmd != '\0') cmd = args->argv[1]; --- 67,78 ---- struct cmd_if_shell_data *cdata; char *shellcmd, *cmd, *error; const char *file; ! struct client *tc = cmdq_get_target_client(item); struct session *s = target->s; struct cmd_parse_input pi; enum cmd_parse_status status; ! shellcmd = format_single_from_target(item, args->argv[0]); if (args_has(args, 'F')) { if (*shellcmd != '0' && *shellcmd != '\0') cmd = args->argv[1]; *************** *** 87,93 **** memset(&pi, 0, sizeof pi); cmd_get_source(self, &pi.file, &pi.line); pi.item = item; ! pi.c = c; cmd_find_copy_state(&pi.fs, target); status = cmd_parse_and_insert(cmd, &pi, item, state, &error); --- 87,93 ---- memset(&pi, 0, sizeof pi); cmd_get_source(self, &pi.file, &pi.line); pi.item = item; ! pi.c = tc; cmd_find_copy_state(&pi.fs, target); status = cmd_parse_and_insert(cmd, &pi, item, state, &error); *************** *** 110,116 **** if (!args_has(args, 'b')) cdata->client = cmdq_get_client(item); else ! cdata->client = c; if (cdata->client != NULL) cdata->client->references++; --- 110,116 ---- if (!args_has(args, 'b')) cdata->client = cmdq_get_client(item); else ! cdata->client = tc; if (cdata->client != NULL) cdata->client->references++; *************** *** 123,129 **** cmd_get_source(self, &file, &cdata->input.line); if (file != NULL) cdata->input.file = xstrdup(file); ! cdata->input.c = c; if (cdata->input.c != NULL) cdata->input.c->references++; cmd_find_copy_state(&cdata->input.fs, target); --- 123,129 ---- cmd_get_source(self, &file, &cdata->input.line); if (file != NULL) cdata->input.file = xstrdup(file); ! cdata->input.c = tc; if (cdata->input.c != NULL) cdata->input.c->references++; cmd_find_copy_state(&cdata->input.fs, target);