mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
revert: "refactor: Remove allow_keys global (#6346)"
This commit is contained in:
@@ -1511,19 +1511,24 @@ int vgetc(void)
|
||||
bool did_inc = false;
|
||||
if (mod_mask) { // no mapping after modifier has been read
|
||||
no_mapping++;
|
||||
allow_keys++;
|
||||
did_inc = true; // mod_mask may change value
|
||||
}
|
||||
c = vgetorpeek(true);
|
||||
if (did_inc) {
|
||||
no_mapping--;
|
||||
allow_keys--;
|
||||
}
|
||||
|
||||
// Get two extra bytes for special keys
|
||||
if (c == K_SPECIAL) {
|
||||
int save_allow_keys = allow_keys;
|
||||
no_mapping++;
|
||||
allow_keys = 0; // make sure BS is not found
|
||||
c2 = vgetorpeek(true); // no mapping for these chars
|
||||
c = vgetorpeek(true);
|
||||
no_mapping--;
|
||||
allow_keys = save_allow_keys;
|
||||
if (c2 == KS_MODIFIER) {
|
||||
mod_mask = c;
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user