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.

8aeec40207

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2023-08-21 10:45:25 +08:00
parent 91d8f2ac53
commit ab45d5bf6d
5 changed files with 82 additions and 0 deletions

View File

@@ -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;