0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 9.0.0397: :defer not tested with exceptions and ":qa!"

Problem:    :defer not tested with exceptions and ":qa!".
Solution:   Test :defer works when exceptions are thrown and when ":qa!" is
            used.  Invoke the deferred calls on exit.
This commit is contained in:
Bram Moolenaar
2022-09-06 18:31:14 +01:00
parent 2834ebdee4
commit 58779858fb
9 changed files with 123 additions and 19 deletions

View File

@@ -1583,6 +1583,11 @@ getout(int exitval)
if (!is_not_a_term_or_gui())
windgoto((int)Rows - 1, 0);
#ifdef FEAT_EVAL
// Invoked all deferred functions in the function stack.
invoke_all_defer();
#endif
#if defined(FEAT_EVAL) || defined(FEAT_SYN_HL)
// Optionally print hashtable efficiency.
hash_debug_results();