mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.2185: BufUnload is not triggered for the quickfix dummy buffer
Problem: BufUnload is not triggered for the quickfix dummy buffer. Solution: Do trigger BufUnload. (Pontus Leitzler,closes #7518, closes #7517) Fix white space around "=".
This commit is contained in:
@@ -6513,7 +6513,7 @@ wipe_dummy_buffer(buf_T *buf, char_u *dirname_start)
|
||||
enter_cleanup(&cs);
|
||||
#endif
|
||||
|
||||
wipe_buffer(buf, FALSE);
|
||||
wipe_buffer(buf, TRUE);
|
||||
|
||||
#if defined(FEAT_EVAL)
|
||||
// Restore the error/interrupt/exception state if not discarded by a
|
||||
|
@@ -221,6 +221,29 @@ func Test_autocmd_bufunload_avoiding_SEGV_02()
|
||||
bwipe! a.txt
|
||||
endfunc
|
||||
|
||||
func Test_autocmd_dummy_wipeout()
|
||||
" prepare files
|
||||
call writefile([''], 'Xdummywipetest1.txt')
|
||||
call writefile([''], 'Xdummywipetest2.txt')
|
||||
augroup test_bufunload_group
|
||||
autocmd!
|
||||
autocmd BufUnload * call add(s:li, "bufunload")
|
||||
autocmd BufDelete * call add(s:li, "bufdelete")
|
||||
autocmd BufWipeout * call add(s:li, "bufwipeout")
|
||||
augroup END
|
||||
|
||||
let s:li = []
|
||||
split Xdummywipetest1.txt
|
||||
silent! vimgrep /notmatched/ Xdummywipetest*
|
||||
call assert_equal(["bufunload", "bufwipeout"], s:li)
|
||||
|
||||
bwipeout
|
||||
call delete('Xdummywipetest1.txt')
|
||||
call delete('Xdummywipetest2.txt')
|
||||
au! test_bufunload_group
|
||||
augroup! test_bufunload_group
|
||||
endfunc
|
||||
|
||||
func Test_win_tab_autocmd()
|
||||
let g:record = []
|
||||
|
||||
|
Reference in New Issue
Block a user