s:common_sink(): Avoid duplicate BufEnter. (#803)

Later versions of Vim/Nvim handle `:edit <dir>` inside try-catch.

e13b9afe12
https://github.com/vim/vim/pull/1375
pull/792/merge
Justin M. Keyes 7 years ago committed by Junegunn Choi
parent fd137a9e87
commit 1896aa1748

@ -155,7 +155,8 @@ function! s:common_sink(action, lines) abort
else
call s:open(cmd, item)
endif
if exists('#BufEnter') && isdirectory(item)
if !has('patch-8.0.0177') && !has('nvim-0.2') && exists('#BufEnter')
\ && isdirectory(item)
doautocmd BufEnter
endif
endfor

Loading…
Cancel
Save