s:dobufread: use count with finddir

This function might need more fixes/changes, but using a count for now
seems to be good.
This commit is contained in:
Daniel Hahler 2018-01-15 01:21:04 +01:00
parent e6a775e0df
commit 0ec2973b22

View File

@ -428,7 +428,7 @@ function! s:dobufread(names)
for name in a:names
let path = s:rtp(g:plugs[name]).'/**'
for dir in ['ftdetect', 'ftplugin']
if len(finddir(dir, path))
if !empty(finddir(dir, path, 1))
if exists('#BufRead')
doautocmd BufRead
endif