diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-09-23 12:41:09 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-23 12:41:09 +0800 |
commit | c88bb658ce6fb12cca3e5324d8a15d1859d095cd (patch) | |
tree | 1134e21022f84669b526d73f1b4a1479b8bad762 /test | |
parent | c26b39a9aa56e834262753e08372240fde9dcdf1 (diff) | |
download | rneovim-c88bb658ce6fb12cca3e5324d8a15d1859d095cd.tar.gz rneovim-c88bb658ce6fb12cca3e5324d8a15d1859d095cd.tar.bz2 rneovim-c88bb658ce6fb12cca3e5324d8a15d1859d095cd.zip |
vim-patch:8.2.4609: :unhide does not check for failing to close a window (#25317)
Problem: :unhide does not check for failing to close a window.
Solution: When closing a window fails continue with the next one. Do not
try closing the autocmd window. (closes vim/vim#9984)
https://github.com/vim/vim/commit/6f2465d336a9d4afe392db4084ef7e9db17e67c1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_autocmd.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/old/testdir/test_autocmd.vim b/test/old/testdir/test_autocmd.vim index 0afa3417ec..9da20e662e 100644 --- a/test/old/testdir/test_autocmd.vim +++ b/test/old/testdir/test_autocmd.vim @@ -4,6 +4,7 @@ source shared.vim source check.vim source term_util.vim source screendump.vim +source vim9.vim source load.vim func s:cleanup_buffers() abort @@ -3432,6 +3433,20 @@ func Test_autocmd_vimgrep() augroup END endfunc +func Test_closing_autocmd_window() + let lines =<< trim END + edit Xa.txt + tabnew Xb.txt + autocmd BufEnter Xa.txt unhide 1 + doautoall BufEnter + END + call CheckScriptFailure(lines, 'E814:') + au! BufEnter + only! + bwipe Xa.txt + bwipe Xb.txt +endfunc + func Test_bufwipeout_changes_window() " This should not crash, but we don't have any expectations about what " happens, changing window in BufWipeout has unpredictable results. |