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:
@@ -428,7 +428,7 @@ 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']
|
||||||
if len(finddir(dir, path))
|
if !empty(finddir(dir, path, 1))
|
||||||
if exists('#BufRead')
|
if exists('#BufRead')
|
||||||
doautocmd BufRead
|
doautocmd BufRead
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user