diff options
author | nicm <nicm> | 2016-10-12 13:03:27 +0000 |
---|---|---|
committer | nicm <nicm> | 2016-10-12 13:03:27 +0000 |
commit | 68bebe1fb7dfe5d152a2734c5bd572b1db641a4c (patch) | |
tree | ebd451ee92e938399563bb994b572639af3e75cd /cmd-command-prompt.c | |
parent | 22a8afee9e8dcbe45a371ca72af0169b7c94eac5 (diff) | |
download | rtmux-68bebe1fb7dfe5d152a2734c5bd572b1db641a4c.tar.gz rtmux-68bebe1fb7dfe5d152a2734c5bd572b1db641a4c.tar.bz2 rtmux-68bebe1fb7dfe5d152a2734c5bd572b1db641a4c.zip |
The repeat prompt in both emacs and vi (and the old one in tmux) doesn't
support line editing and instead executes a command as soon as a
non-number key is pressed. Add a -N flag to command-prompt for the same
in copy mode. Reported by Theo Buehler.
Diffstat (limited to 'cmd-command-prompt.c')
-rw-r--r-- | cmd-command-prompt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd-command-prompt.c b/cmd-command-prompt.c index 09ab9813..12ecb493 100644 --- a/cmd-command-prompt.c +++ b/cmd-command-prompt.c @@ -38,8 +38,8 @@ const struct cmd_entry cmd_command_prompt_entry = { .name = "command-prompt", .alias = NULL, - .args = { "1I:p:t:", 0, 1 }, - .usage = "[-1] [-I inputs] [-p prompts] " CMD_TARGET_CLIENT_USAGE " " + .args = { "1I:Np:t:", 0, 1 }, + .usage = "[-1N] [-I inputs] [-p prompts] " CMD_TARGET_CLIENT_USAGE " " "[template]", .tflag = CMD_CLIENT, @@ -112,6 +112,8 @@ cmd_command_prompt_exec(struct cmd *self, struct cmd_q *cmdq) flags = 0; if (args_has(args, '1')) flags |= PROMPT_SINGLE; + else if (args_has(args, 'N')) + flags |= PROMPT_NUMERIC; status_prompt_set(c, prompt, input, cmd_command_prompt_callback, cmd_command_prompt_free, cdata, flags); free(prompt); |