aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-05 17:01:39 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-11-07 08:24:48 +0800
commit84881674fd702cad5b7572ac868f6d40965a2806 (patch)
tree67e6e2d09e8e33ed6f5beb93299674288b943841 /src/nvim/testdir
parent595f7f37a98f3af12fe94ba4332b8f33004b7e4b (diff)
downloadrneovim-84881674fd702cad5b7572ac868f6d40965a2806.tar.gz
rneovim-84881674fd702cad5b7572ac868f6d40965a2806.tar.bz2
rneovim-84881674fd702cad5b7572ac868f6d40965a2806.zip
vim-patch:9.0.0389: crash when 'tagfunc' closes the window
Problem: Crash when 'tagfunc' closes the window. Solution: Bail out when the window was closed. https://github.com/vim/vim/commit/ccfde4d028e891a41e3548323c3d47b06fb0b83e Add docs for E1299 from Vim runtime. Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_tagfunc.vim13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_tagfunc.vim b/src/nvim/testdir/test_tagfunc.vim
index ad761f1b23..8690e30e77 100644
--- a/src/nvim/testdir/test_tagfunc.vim
+++ b/src/nvim/testdir/test_tagfunc.vim
@@ -285,4 +285,17 @@ func Test_tagfunc_wipes_buffer()
set tagfunc=
endfunc
+func Test_tagfunc_closes_window()
+ split any
+ func MytagfuncClose(pat, flags, info)
+ close
+ return [{'name' : 'mytag', 'filename' : 'Xtest', 'cmd' : '1'}]
+ endfunc
+ set tagfunc=MytagfuncClose
+ call assert_fails('tag xyz', 'E1299:')
+
+ set tagfunc=
+endfunc
+
+
" vim: shiftwidth=2 sts=2 expandtab