forked from aniani/vim
patch 8.2.1059: crash when using :tabonly in an autocommand
Problem: Crash when using :tabonly in an autocommand. (Yegappan Lakshmanan) Solution: Do not allow the autocommand window to be closed.
This commit is contained in:
@@ -2617,7 +2617,27 @@ func Test_close_autocmd_window()
|
||||
au!
|
||||
augroup END
|
||||
augroup! aucmd_win_test2
|
||||
%bw!
|
||||
%bwipe!
|
||||
endfunc
|
||||
|
||||
" Test for trying to close the tab that has the temporary window for exeucing
|
||||
" an autocmd.
|
||||
func Test_close_autocmd_tab()
|
||||
edit one.txt
|
||||
tabnew two.txt
|
||||
augroup aucmd_win_test
|
||||
au!
|
||||
au BufEnter * if expand('<afile>') == 'one.txt' | tabfirst | tabonly | endif
|
||||
augroup END
|
||||
|
||||
call assert_fails('doautoall BufEnter', 'E813:')
|
||||
|
||||
tabonly
|
||||
augroup aucmd_win_test
|
||||
au!
|
||||
augroup END
|
||||
augroup! aucmd_win_test
|
||||
%bwipe!
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
Reference in New Issue
Block a user