From 9d306ac6b79c13b5f42ea4e22c6f8ccc628f6a6a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 11 May 2023 08:09:13 +0800 Subject: vim-patch:9.0.1538: :wqall does not trigger ExitPre (#23574) Problem: :wqall does not trigger ExitPre. (Bart Libert) Solution: Move preparations for :qall to a common function. (closes vim/vim#12374) https://github.com/vim/vim/commit/411da64e77ef9d8edd1a5aa80fa5b9a4b159c93d Co-authored-by: Bram Moolenaar --- test/old/testdir/test_exit.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') diff --git a/test/old/testdir/test_exit.vim b/test/old/testdir/test_exit.vim index 6dbfb7047c..93e55ce575 100644 --- a/test/old/testdir/test_exit.vim +++ b/test/old/testdir/test_exit.vim @@ -81,6 +81,18 @@ func Test_exiting() \ readfile('Xtestout')) endif call delete('Xtestout') + + " ExitPre autocommand also executed on :wqall + let after =<< trim [CODE] + au QuitPre * call writefile(["QuitPre"], "Xtestout", "a") + au ExitPre * call writefile(["ExitPre"], "Xtestout", "a") + wqall + [CODE] + + if RunVim([], after, '') + call assert_equal(['QuitPre', 'ExitPre'], readfile('Xtestout')) + endif + call delete('Xtestout') endfunc " Test for getting the Vim exit code from v:exiting -- cgit