From 68bebe1fb7dfe5d152a2734c5bd572b1db641a4c Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 12 Oct 2016 13:03:27 +0000 Subject: 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. --- server-client.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'server-client.c') diff --git a/server-client.c b/server-client.c index d5c0cf23..7e4d1ee4 100644 --- a/server-client.c +++ b/server-client.c @@ -727,9 +727,10 @@ server_client_handle_key(struct client *c, key_code key) server_clear_identify(c, NULL); } if (c->prompt_string != NULL) { - if (!(c->flags & CLIENT_READONLY)) - status_prompt_key(c, key); - return; + if (c->flags & CLIENT_READONLY) + return; + if (status_prompt_key(c, key) == 0) + return; } /* Check for mouse keys. */ -- cgit