aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-04-07 21:46:07 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-04-08 08:54:07 +0800
commit44b59d1a696b35d2520dbea2de3aab01e740a7ca (patch)
treeaaaf5fc54edfdb48fe0fbb3fed400a7d9864bc65 /src/nvim/testdir
parent8f3245dbfa91d384215c78da32e4d1739c8a1f34 (diff)
downloadrneovim-44b59d1a696b35d2520dbea2de3aab01e740a7ca.tar.gz
rneovim-44b59d1a696b35d2520dbea2de3aab01e740a7ca.tar.bz2
rneovim-44b59d1a696b35d2520dbea2de3aab01e740a7ca.zip
vim-patch:8.2.0004: get E685 and E931 if buffer reload is interrupted
Problem: Get E685 and E931 if buffer reload is interrupted. Solution: Do not abort deleting a dummy buffer. (closes vim/vim#5361) https://github.com/vim/vim/commit/a6e8f888e7fc31b8ab7233509254fb2e2fe4089f
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_trycatch.vim27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_trycatch.vim b/src/nvim/testdir/test_trycatch.vim
index 7e513180a3..adc1745b39 100644
--- a/src/nvim/testdir/test_trycatch.vim
+++ b/src/nvim/testdir/test_trycatch.vim
@@ -1972,6 +1972,29 @@ func Test_builtin_func_error()
call assert_equal('jlmnpqrtueghivyzACD', g:Xpath)
endfunc
-" Modelines {{{1
+func Test_reload_in_try_catch()
+ call writefile(['x'], 'Xreload')
+ set autoread
+ edit Xreload
+ tabnew
+ call writefile(['xx'], 'Xreload')
+ augroup ReLoad
+ au FileReadPost Xreload let x = doesnotexist
+ au BufReadPost Xreload let x = doesnotexist
+ augroup END
+ try
+ edit Xreload
+ catch
+ endtry
+ tabnew
+
+ tabclose
+ tabclose
+ autocmd! ReLoad
+ set noautoread
+ bwipe! Xreload
+ call delete('Xreload')
+endfunc
+
+" Modeline {{{1
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
-"-------------------------------------------------------------------------------