aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/input.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-04-27 09:03:09 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-04-29 15:51:04 +0800
commitf6afc7c3246db6e5bd8feab717b3c0dbf0226803 (patch)
tree533dc9a6727f66e9a64fd4a129ea87c0c7e0cc5b /src/nvim/input.c
parentd531ef6813919dd6df8ca6927cd99ec3c0a65635 (diff)
downloadrneovim-f6afc7c3246db6e5bd8feab717b3c0dbf0226803.tar.gz
rneovim-f6afc7c3246db6e5bd8feab717b3c0dbf0226803.tar.bz2
rneovim-f6afc7c3246db6e5bd8feab717b3c0dbf0226803.zip
revert: "refactor: Remove allow_keys global (#6346)"
Diffstat (limited to 'src/nvim/input.c')
-rw-r--r--src/nvim/input.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/input.c b/src/nvim/input.c
index ff6b559710..6827dcae87 100644
--- a/src/nvim/input.c
+++ b/src/nvim/input.c
@@ -42,6 +42,7 @@ int ask_yesno(const char *const str, const bool direct)
State = CONFIRM; // Mouse behaves like with :confirm.
setmouse(); // Disable mouse in xterm.
no_mapping++;
+ allow_keys++; // no mapping here, but recognize keys
int r = ' ';
while (r != 'y' && r != 'n') {
@@ -62,6 +63,7 @@ int ask_yesno(const char *const str, const bool direct)
State = save_State;
setmouse();
no_mapping--;
+ allow_keys--;
return r;
}
@@ -172,6 +174,7 @@ int get_number(int colon, int *mouse_used)
}
no_mapping++;
+ allow_keys++; // no mapping here, but recognize keys
for (;;) {
ui_cursor_goto(msg_row, msg_col);
c = safe_vgetc();
@@ -205,6 +208,7 @@ int get_number(int colon, int *mouse_used)
}
}
no_mapping--;
+ allow_keys--;
return n;
}