=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-send-keys.c,v retrieving revision 1.32 retrieving revision 1.33 diff -c -r1.32 -r1.33 *** src/usr.bin/tmux/cmd-send-keys.c 2016/10/16 17:55:14 1.32 --- src/usr.bin/tmux/cmd-send-keys.c 2016/10/16 19:04:05 1.33 *************** *** 1,4 **** ! /* $OpenBSD: cmd-send-keys.c,v 1.32 2016/10/16 17:55:14 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-send-keys.c,v 1.33 2016/10/16 19:04:05 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott *************** *** 27,33 **** * Send keys to client. */ ! static enum cmd_retval cmd_send_keys_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_send_keys_entry = { .name = "send-keys", --- 27,33 ---- * Send keys to client. */ ! static enum cmd_retval cmd_send_keys_exec(struct cmd *, struct cmdq_item *); const struct cmd_entry cmd_send_keys_entry = { .name = "send-keys", *************** *** 56,68 **** }; static enum cmd_retval ! cmd_send_keys_exec(struct cmd *self, struct cmd_q *cmdq) { struct args *args = self->args; ! struct client *c = cmdq->state.c; ! struct window_pane *wp = cmdq->state.tflag.wp; ! struct session *s = cmdq->state.tflag.s; ! struct mouse_event *m = &cmdq->mouse; const u_char *keystr; int i, literal; key_code key; --- 56,68 ---- }; static enum cmd_retval ! cmd_send_keys_exec(struct cmd *self, struct cmdq_item *item) { struct args *args = self->args; ! struct client *c = item->state.c; ! struct window_pane *wp = item->state.tflag.wp; ! struct session *s = item->state.tflag.s; ! struct mouse_event *m = &item->mouse; const u_char *keystr; int i, literal; key_code key; *************** *** 71,82 **** if (args_has(args, 'N')) { if (wp->mode == NULL || wp->mode->command == NULL) { ! cmdq_error(cmdq, "not in a mode"); return (CMD_RETURN_ERROR); } np = args_strtonum(args, 'N', 1, UINT_MAX, &cause); if (cause != NULL) { ! cmdq_error(cmdq, "prefix %s", cause); free(cause); return (CMD_RETURN_ERROR); } --- 71,82 ---- if (args_has(args, 'N')) { if (wp->mode == NULL || wp->mode->command == NULL) { ! cmdq_error(item, "not in a mode"); return (CMD_RETURN_ERROR); } np = args_strtonum(args, 'N', 1, UINT_MAX, &cause); if (cause != NULL) { ! cmdq_error(item, "prefix %s", cause); free(cause); return (CMD_RETURN_ERROR); } *************** *** 85,91 **** if (args_has(args, 'X')) { if (wp->mode == NULL || wp->mode->command == NULL) { ! cmdq_error(cmdq, "not in a mode"); return (CMD_RETURN_ERROR); } if (!m->valid) --- 85,91 ---- if (args_has(args, 'X')) { if (wp->mode == NULL || wp->mode->command == NULL) { ! cmdq_error(item, "not in a mode"); return (CMD_RETURN_ERROR); } if (!m->valid) *************** *** 101,107 **** if (args_has(args, 'M')) { wp = cmd_mouse_pane(m, &s, NULL); if (wp == NULL) { ! cmdq_error(cmdq, "no mouse target"); return (CMD_RETURN_ERROR); } window_pane_key(wp, NULL, s, m->key, m); --- 101,107 ---- if (args_has(args, 'M')) { wp = cmd_mouse_pane(m, &s, NULL); if (wp == NULL) { ! cmdq_error(item, "no mouse target"); return (CMD_RETURN_ERROR); } window_pane_key(wp, NULL, s, m->key, m);