revert: "refactor: Remove allow_keys global (#6346)"

This commit is contained in:
zeertzjq
2022-04-27 09:03:09 +08:00
parent d531ef6813
commit f6afc7c324
11 changed files with 42 additions and 0 deletions

View File

@@ -762,8 +762,10 @@ static int insert_execute(VimState *state, int key)
// may need to redraw when no more chars available now
ins_redraw(false);
no_mapping++;
allow_keys++;
s->c = plain_vgetc();
no_mapping--;
allow_keys--;
if (s->c != Ctrl_N && s->c != Ctrl_G && s->c != Ctrl_O) {
// it's something else
vungetc(s->c);
@@ -9237,8 +9239,10 @@ static int ins_digraph(void)
// don't map the digraph chars. This also prevents the
// mode message to be deleted when ESC is hit
no_mapping++;
allow_keys++;
c = plain_vgetc();
no_mapping--;
allow_keys--;
if (did_putchar) {
// when the line fits in 'columns' the '?' is at the start of the next
// line and will not be removed by the redraw
@@ -9264,8 +9268,10 @@ static int ins_digraph(void)
add_to_showcmd_c(c);
}
no_mapping++;
allow_keys++;
cc = plain_vgetc();
no_mapping--;
allow_keys--;
if (did_putchar) {
// when the line fits in 'columns' the '?' is at the start of the
// next line and will not be removed by a redraw