mirror of
https://github.com/neovim/neovim.git
synced 2025-12-09 16:12:48 +00:00
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)
6f2465d336
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user