Avoid downward search when using finddir

Close #750
This commit is contained in:
Junegunn Choi 2019-05-29 18:29:11 +09:00
parent 518a3566c3
commit 08e78d8a5e
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

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