vim-patch:8.0.0177

Problem:    When opening a buffer on a directory and inside a try/catch then
            the BufEnter event is not triggered.
Solution:   Return NOTDONE from readfile() for a directory and deal with the
            three possible return values. (Justin M. Keyes, closes vim/vim#1375,
            closes vim/vim#1353)

e13b9afe12
This commit is contained in:
Justin M. Keyes 2017-03-20 13:59:11 +01:00
parent b9e1289819
commit ca853edb6f

View File

@ -196,6 +196,25 @@ func Test_augroup_deleted()
au! VimEnter
endfunc
func Test_BufEnter()
au! BufEnter
au Bufenter * let val = val . '+'
let g:val = ''
split NewFile
call assert_equal('+', g:val)
bwipe!
call assert_equal('++', g:val)
" Also get BufEnter when editing a directory
call mkdir('Xdir')
split Xdir
call assert_equal('+++', g:val)
bwipe!
call delete('Xdir', 'd')
au! BufEnter
endfunc
" Closing a window might cause an endless loop
" E814 for older Vims
function Test_autocmd_bufwipe_in_SessLoadPost()