diff options
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r-- | src/nvim/getchar.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 2e584e7cff..957f13b1da 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -885,6 +885,7 @@ int ins_typebuf(char *str, int noremap, int offset, bool nottyped, bool silent) if (++typebuf.tb_change_cnt == 0) { typebuf.tb_change_cnt = 1; } + state_no_longer_safe(); addlen = (int)strlen(str); @@ -1625,6 +1626,12 @@ int vgetc(void) // Execute Lua on_key callbacks. nlua_execute_on_key(c); + // Need to process the character before we know it's safe to do something + // else. + if (c != K_IGNORE) { + state_no_longer_safe(); + } + return c; } |