summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-09-06 18:31:14 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-06 18:31:14 +0100
commit58779858fb5a82a3233af5d4237a3cece88c10d4 (patch)
treec1654eb20a1a8300e1b304263ccea655928b3401 /src/main.c
parent2834ebdee473c838e50e60d0aa160f0e62fc8ef9 (diff)
patch 9.0.0397: :defer not tested with exceptions and ":qa!"v9.0.0397
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.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 7a42463ba3..2a2dcb0cac 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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();