0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 9.0.1470: deferred functions invoked in unexpected order

Problem:    Deferred functions invoked in unexpected order when using :qa and
            autocommands.
Solution:   Call deferred functions for the current funccal before using the
            stack. (closes #12278)
This commit is contained in:
zeertzjq
2023-04-19 14:21:24 +01:00
committed by Bram Moolenaar
parent 960cf9119e
commit 1be4b81bfb
3 changed files with 33 additions and 15 deletions

View File

@@ -6144,12 +6144,12 @@ invoke_funccall_defer(funccall_T *fc)
void
invoke_all_defer(void)
{
for (funccall_T *fc = current_funccal; fc != NULL; fc = fc->fc_caller)
invoke_funccall_defer(fc);
for (funccal_entry_T *fce = funccal_stack; fce != NULL; fce = fce->next)
for (funccall_T *fc = fce->top_funccal; fc != NULL; fc = fc->fc_caller)
invoke_funccall_defer(fc);
for (funccall_T *fc = current_funccal; fc != NULL; fc = fc->fc_caller)
invoke_funccall_defer(fc);
}
/*