diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-04-27 09:03:09 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-04-29 15:51:04 +0800 |
commit | f6afc7c3246db6e5bd8feab717b3c0dbf0226803 (patch) | |
tree | 533dc9a6727f66e9a64fd4a129ea87c0c7e0cc5b /src/nvim/edit.c | |
parent | d531ef6813919dd6df8ca6927cd99ec3c0a65635 (diff) | |
download | rneovim-f6afc7c3246db6e5bd8feab717b3c0dbf0226803.tar.gz rneovim-f6afc7c3246db6e5bd8feab717b3c0dbf0226803.tar.bz2 rneovim-f6afc7c3246db6e5bd8feab717b3c0dbf0226803.zip |
revert: "refactor: Remove allow_keys global (#6346)"
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 3e3648e61f..b8f88895a4 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -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 |