=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-send-keys.c,v retrieving revision 1.18 retrieving revision 1.19 diff -c -r1.18 -r1.19 *** src/usr.bin/tmux/cmd-send-keys.c 2014/10/20 22:29:25 1.18 --- src/usr.bin/tmux/cmd-send-keys.c 2015/04/19 21:34:21 1.19 *************** *** 1,4 **** ! /* $OpenBSD: cmd-send-keys.c,v 1.18 2014/10/20 22:29:25 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-send-keys.c,v 1.19 2015/04/19 21:34:21 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott *************** *** 31,38 **** const struct cmd_entry cmd_send_keys_entry = { "send-keys", "send", ! "lRt:", 0, -1, ! "[-lR] " CMD_TARGET_PANE_USAGE " key ...", 0, cmd_send_keys_exec }; --- 31,38 ---- const struct cmd_entry cmd_send_keys_entry = { "send-keys", "send", ! "lRMt:", 0, -1, ! "[-lRM] " CMD_TARGET_PANE_USAGE " key ...", 0, cmd_send_keys_exec }; *************** *** 49,60 **** --- 49,71 ---- cmd_send_keys_exec(struct cmd *self, struct cmd_q *cmdq) { struct args *args = self->args; + struct mouse_event *m = &cmdq->item->mouse; struct window_pane *wp; struct session *s; struct input_ctx *ictx; const u_char *str; int i, key; + 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); + return (CMD_RETURN_NORMAL); + } + if (cmd_find_pane(cmdq, args_get(args, 't'), &s, &wp) == NULL) return (CMD_RETURN_ERROR); *************** *** 63,69 **** key = options_get_number(&s->options, "prefix2"); else key = options_get_number(&s->options, "prefix"); ! window_pane_key(wp, s, key); return (CMD_RETURN_NORMAL); } --- 74,80 ---- key = options_get_number(&s->options, "prefix2"); else key = options_get_number(&s->options, "prefix"); ! window_pane_key(wp, NULL, s, key, NULL); return (CMD_RETURN_NORMAL); } *************** *** 88,97 **** if (!args_has(args, 'l') && (key = key_string_lookup_string(str)) != KEYC_NONE) { ! window_pane_key(wp, s, key); } else { for (; *str != '\0'; str++) ! window_pane_key(wp, s, *str); } } --- 99,108 ---- if (!args_has(args, 'l') && (key = key_string_lookup_string(str)) != KEYC_NONE) { ! window_pane_key(wp, NULL, s, key, NULL); } else { for (; *str != '\0'; str++) ! window_pane_key(wp, NULL, s, *str, NULL); } }