diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-08-21 10:45:25 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-08-21 14:16:15 +0800 |
commit | ab45d5bf6d46abd9b29389dee6689044fd63e225 (patch) | |
tree | 02f0cf7db2832114639613ead497b45a409deb40 /src/nvim/ex_getln.c | |
parent | 91d8f2ac534a51859c0e3c6562d07c94b27f4478 (diff) | |
download | rneovim-ab45d5bf6d46abd9b29389dee6689044fd63e225.tar.gz rneovim-ab45d5bf6d46abd9b29389dee6689044fd63e225.tar.bz2 rneovim-ab45d5bf6d46abd9b29389dee6689044fd63e225.zip |
vim-patch:8.1.2044: no easy way to process postponed work
Problem: No easy way to process postponed work. (Paul Jolly)
Solution: Add the SafeState autocommand event.
https://github.com/vim/vim/commit/8aeec40207b5adcd3a155277dc4f29189343b963
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r-- | src/nvim/ex_getln.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 89f5e92c33..6af79bfd21 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -943,6 +943,8 @@ theend: static int command_line_check(VimState *state) { + CommandLineState *s = (CommandLineState *)state; + redir_off = true; // Don't redirect the typed command. // Repeated, because a ":redir" inside // completion may switch it on. @@ -952,6 +954,9 @@ static int command_line_check(VimState *state) // that occurs while typing a command should // cause the command not to be executed. + // Trigger SafeState if nothing is pending. + may_trigger_safestate(s->xpc.xp_numfiles <= 0); + cursorcmd(); // set the cursor on the right spot ui_cursor_shape(); return 1; |