=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-if-shell.c,v retrieving revision 1.70 retrieving revision 1.71 diff -c -r1.70 -r1.71 *** src/usr.bin/tmux/cmd-if-shell.c 2020/04/13 14:04:25 1.70 --- src/usr.bin/tmux/cmd-if-shell.c 2020/04/13 14:46:04 1.71 *************** *** 1,4 **** ! /* $OpenBSD: cmd-if-shell.c,v 1.70 2020/04/13 14:04:25 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha --- 1,4 ---- ! /* $OpenBSD: cmd-if-shell.c,v 1.71 2020/04/13 14:46:04 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha *************** *** 56,71 **** struct client *client; struct cmdq_item *item; ! struct mouse_event mouse; }; static enum cmd_retval cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item) { struct args *args = cmd_get_args(self); - struct cmdq_state *state = cmdq_get_state(item); struct cmd_find_state *target = cmdq_get_target(item); ! struct mouse_event *m = &state->event.m; struct cmd_if_shell_data *cdata; char *shellcmd, *cmd; const char *file; --- 56,70 ---- struct client *client; struct cmdq_item *item; ! struct key_event event; }; static enum cmd_retval cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item) { struct args *args = cmd_get_args(self); struct cmd_find_state *target = cmdq_get_target(item); ! struct key_event *event = cmdq_get_event(item); struct cmd_if_shell_data *cdata; char *shellcmd, *cmd; const char *file; *************** *** 102,108 **** free(pr->error); return (CMD_RETURN_ERROR); case CMD_PARSE_SUCCESS: ! new_item = cmdq_get_command(pr->cmdlist, target, m, 0); cmdq_insert_after(item, new_item); cmd_list_free(pr->cmdlist); break; --- 101,108 ---- free(pr->error); return (CMD_RETURN_ERROR); case CMD_PARSE_SUCCESS: ! new_item = cmdq_get_command(pr->cmdlist, target, event, ! 0); cmdq_insert_after(item, new_item); cmd_list_free(pr->cmdlist); break; *************** *** 117,123 **** cdata->cmd_else = xstrdup(args->argv[2]); else cdata->cmd_else = NULL; ! memcpy(&cdata->mouse, m, sizeof cdata->mouse); if (!args_has(args, 'b')) cdata->client = cmdq_get_client(item); --- 117,123 ---- cdata->cmd_else = xstrdup(args->argv[2]); else cdata->cmd_else = NULL; ! memcpy(&cdata->event, event, sizeof cdata->event); if (!args_has(args, 'b')) cdata->client = cmdq_get_client(item); *************** *** 161,167 **** { struct cmd_if_shell_data *cdata = job_get_data(job); struct client *c = cdata->client; ! struct mouse_event *m = &cdata->mouse; struct cmdq_item *new_item = NULL; char *cmd; int status; --- 161,167 ---- { struct cmd_if_shell_data *cdata = job_get_data(job); struct client *c = cdata->client; ! struct key_event *event = &cdata->event; struct cmdq_item *new_item = NULL; char *cmd; int status; *************** *** 185,191 **** free(pr->error); break; case CMD_PARSE_SUCCESS: ! new_item = cmdq_get_command(pr->cmdlist, NULL, m, 0); cmd_list_free(pr->cmdlist); break; } --- 185,191 ---- free(pr->error); break; case CMD_PARSE_SUCCESS: ! new_item = cmdq_get_command(pr->cmdlist, NULL, event, 0); cmd_list_free(pr->cmdlist); break; }