Skip to content

Commit

Permalink
s:common_sink(): Avoid duplicate BufEnter. (#803)
Browse files Browse the repository at this point in the history
Later versions of Vim/Nvim handle `:edit <dir>` inside try-catch.

vim/vim@e13b9af
vim/vim#1375
  • Loading branch information
justinmk authored and junegunn committed Jan 14, 2017
1 parent fd137a9 commit 1896aa1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugin/fzf.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1896aa1

Please sign in to comment.