Mercurial > vim
diff src/testdir/test_trycatch.vim @ 18886:050f5eaa9e50 v8.2.0004
patch 8.2.0004: get E685 and E931 if buffer reload is interrupted
Commit: https://github.com/vim/vim/commit/a6e8f888e7fc31b8ab7233509254fb2e2fe4089f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Dec 14 16:18:15 2019 +0100
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 https://github.com/vim/vim/issues/5361)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 14 Dec 2019 16:30:04 +0100 |
parents | ece46bd3c9af |
children | cb73f4ae6b7c |
line wrap: on
line diff
--- a/src/testdir/test_trycatch.vim +++ b/src/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 -"-------------------------------------------------------------------------------