aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/input.c
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2022-10-11 19:00:34 +0000
committerJosh Rahm <rahm@google.com>2022-10-11 19:00:34 +0000
commitc367400b73d207833d51e09d663f969ffab37531 (patch)
treebc26006d942509a92b514107f9d8dca6d3911128 /src/nvim/input.c
parent4066fa85abef16fa23c30e94dc4d2bfb3b9c4545 (diff)
parent760b399f6c0c6470daa0663752bd22886997f9e6 (diff)
downloadrneovim-c367400b73d207833d51e09d663f969ffab37531.tar.gz
rneovim-c367400b73d207833d51e09d663f969ffab37531.tar.bz2
rneovim-c367400b73d207833d51e09d663f969ffab37531.zip
Merge remote-tracking branch 'upstream/master' into colorcolchar
Diffstat (limited to 'src/nvim/input.c')
-rw-r--r--src/nvim/input.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/nvim/input.c b/src/nvim/input.c
index 37c2903cfd..681d9d5f9c 100644
--- a/src/nvim/input.c
+++ b/src/nvim/input.c
@@ -46,7 +46,7 @@ int ask_yesno(const char *const str, const bool direct)
int r = ' ';
while (r != 'y' && r != 'n') {
- // Same highlighting as for wait_return.
+ // same highlighting as for wait_return()
smsg_attr(HL_ATTR(HLF_R), "%s (y/n)?", str);
if (direct) {
r = get_keystroke(NULL);
@@ -83,7 +83,6 @@ int get_keystroke(MultiQueue *events)
int len = 0;
int n;
int save_mapped_ctrl_c = mapped_ctrl_c;
- int waited = 0;
mapped_ctrl_c = 0; // mappings are not used here
for (;;) {
@@ -110,10 +109,8 @@ int get_keystroke(MultiQueue *events)
// Replace zero and K_SPECIAL by a special key code.
n = fix_input_buffer(buf + len, n);
len += n;
- waited = 0;
- } else if (len > 0) {
- waited++; // keep track of the waiting time
}
+
if (n > 0) { // found a termcode: adjust length
len = n;
}