aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd-send-keys.c6
-rw-r--r--tmux.11
2 files changed, 7 insertions, 0 deletions
diff --git a/cmd-send-keys.c b/cmd-send-keys.c
index 44b796ba..47fa1caa 100644
--- a/cmd-send-keys.c
+++ b/cmd-send-keys.c
@@ -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,
diff --git a/tmux.1 b/tmux.1
index d48415fe..46611df2 100644
--- a/tmux.1
+++ b/tmux.1
@@ -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