aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/main.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-16 11:37:41 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-04-16 15:04:41 +0800
commit7b05ddbb72717f995fedc81583d73f82c78c881d (patch)
tree0e09fc8651f9fabd194751f2b9fcd56c3c1118d8 /src/nvim/main.c
parent335bef0c211dc962499814d248670ff17758a642 (diff)
downloadrneovim-7b05ddbb72717f995fedc81583d73f82c78c881d.tar.gz
rneovim-7b05ddbb72717f995fedc81583d73f82c78c881d.tar.bz2
rneovim-7b05ddbb72717f995fedc81583d73f82c78c881d.zip
vim-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. https://github.com/vim/vim/commit/58779858fb5a82a3233af5d4237a3cece88c10d4 Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r--src/nvim/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c
index 0ef1fc9391..698c2dcc4f 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -30,6 +30,7 @@
#include "nvim/eval.h"
#include "nvim/eval/typval.h"
#include "nvim/eval/typval_defs.h"
+#include "nvim/eval/userfunc.h"
#include "nvim/event/multiqueue.h"
#include "nvim/event/stream.h"
#include "nvim/ex_cmds.h"
@@ -693,6 +694,9 @@ void getout(int exitval)
// Position the cursor on the last screen line, below all the text
ui_cursor_goto(Rows - 1, 0);
+ // Invoked all deferred functions in the function stack.
+ invoke_all_defer();
+
// Optionally print hashtable efficiency.
hash_debug_results();