diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-04-19 07:52:53 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-04-19 08:09:46 +0800 |
commit | 8e0ad6e261b81e9e2649bdba103904867b7ff6ef (patch) | |
tree | 2fc4e753fb8caf6176792267fb099205ca18f1a8 /test | |
parent | 0a3645a72307afa563683a6e06c544810e0b65eb (diff) | |
download | rneovim-8e0ad6e261b81e9e2649bdba103904867b7ff6ef.tar.gz rneovim-8e0ad6e261b81e9e2649bdba103904867b7ff6ef.tar.bz2 rneovim-8e0ad6e261b81e9e2649bdba103904867b7ff6ef.zip |
vim-patch:9.0.1462: recursively calling :defer function if it does :qa
Problem: Recursively calling :defer function if it does :qa.
Solution: Clear the defer entry before calling the function. (closes vim/vim#12266)
https://github.com/vim/vim/commit/42994bf678f46dc9ca66e49f512261da8864fff6
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_user_func.vim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/old/testdir/test_user_func.vim b/test/old/testdir/test_user_func.vim index 0f9b40814c..d217ca8c69 100644 --- a/test/old/testdir/test_user_func.vim +++ b/test/old/testdir/test_user_func.vim @@ -614,6 +614,7 @@ func Test_defer_quitall() " vim9script func DeferLevelTwo() call writefile(['text'], 'XQuitallTwo', 'D') + call writefile(['quit'], 'XQuitallThree', 'a') qa! endfunc @@ -632,6 +633,9 @@ func Test_defer_quitall() call assert_equal(0, v:shell_error) call assert_false(filereadable('XQuitallOne')) call assert_false(filereadable('XQuitallTwo')) + call assert_equal(['quit'], readfile('XQuitallThree')) + + call delete('XQuitallThree') endfunc func Test_defer_quitall_in_expr_func() |