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
This commit is contained in:
Justin M. Keyes 2017-01-14 12:55:30 +01:00 committed by Junegunn Choi
parent fd137a9e87
commit 1896aa1748

View File

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