0
0
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:
Bram Moolenaar
2020-12-22 11:40:45 +01:00
parent 9a963377b4
commit 1cfb9bb5c0
2 changed files with 108 additions and 85 deletions

View File

@@ -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

View File

@@ -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 = []