mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
vim-patch:8.1.2046: SafeState may be triggered at the wrong moment
Problem: SafeState may be triggered at the wrong moment.
Solution: Move it up higher to after where messages are processed. Add a
SafeStateAgain event to tigger there.
69198cb8c0
SafeStateAgain is N/A.
Move SafeState functions to state.c.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user