Make send-keys without any arguments send the key it is bound to (if

any). GitHub issue 2904.
pull/2918/head
nicm 2021-10-05 12:49:37 +00:00
parent 9b1fdb291e
commit 9f6164a05c
2 changed files with 7 additions and 0 deletions

View File

@ -202,6 +202,12 @@ cmd_send_keys_exec(struct cmd *self, struct cmdq_item *item)
wp->flags |= (PANE_STYLECHANGED|PANE_REDRAW);
}
if (count == 0) {
for (; np != 0; np--)
cmd_send_keys_inject_key(item, NULL, event->key);
return (CMD_RETURN_NORMAL);
}
for (; np != 0; np--) {
for (i = 0; i < count; i++) {
after = cmd_send_keys_inject_string(item, after, args,

1
tmux.1
View File

@ -3123,6 +3123,7 @@ or
to send; if the string is not recognised as a key, it is sent as a series of
characters.
All arguments are sent sequentially from first to last.
If no keys are given and the command is bound to a key, then that key is used.
.Pp
The
.Fl l