=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-if-shell.c,v retrieving revision 1.66 retrieving revision 1.67 diff -c -r1.66 -r1.67 *** src/usr.bin/tmux/cmd-if-shell.c 2020/03/19 13:43:18 1.66 --- src/usr.bin/tmux/cmd-if-shell.c 2020/04/13 08:26:27 1.67 *************** *** 1,4 **** ! /* $OpenBSD: cmd-if-shell.c,v 1.66 2020/03/19 13:43:18 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha --- 1,4 ---- ! /* $OpenBSD: cmd-if-shell.c,v 1.67 2020/04/13 08:26:27 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha *************** *** 62,71 **** static enum cmd_retval cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item) { ! struct args *args = self->args; struct mouse_event *m = &item->shared->mouse; struct cmd_if_shell_data *cdata; char *shellcmd, *cmd; struct cmdq_item *new_item; struct cmd_find_state *fs = &item->target; struct client *c = cmd_find_client(item, NULL, 1); --- 62,72 ---- static enum cmd_retval cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item) { ! struct args *args = cmd_get_args(self); struct mouse_event *m = &item->shared->mouse; struct cmd_if_shell_data *cdata; char *shellcmd, *cmd; + const char *file; struct cmdq_item *new_item; struct cmd_find_state *fs = &item->target; struct client *c = cmd_find_client(item, NULL, 1); *************** *** 88,96 **** return (CMD_RETURN_NORMAL); memset(&pi, 0, sizeof pi); ! if (self->file != NULL) ! pi.file = self->file; ! pi.line = self->line; pi.item = item; pi.c = c; cmd_find_copy_state(&pi.fs, fs); --- 89,95 ---- return (CMD_RETURN_NORMAL); 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, fs); *************** *** 134,143 **** cdata->item = NULL; memset(&cdata->input, 0, sizeof cdata->input); ! if (self->file != NULL) ! cdata->input.file = xstrdup(self->file); ! cdata->input.line = self->line; ! cdata->input.item = cdata->item; cdata->input.c = c; if (cdata->input.c != NULL) cdata->input.c->references++; --- 133,141 ---- cdata->item = NULL; memset(&cdata->input, 0, sizeof cdata->input); ! 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++;