Fix wildcard expansion in find_autoload_file
When using vim's native mechanism for `packages`, wildcards (*) are used in the `runtimepath` since package folders can have arbitrary names. They were not expanded, thus a path to e.g. `default.tpl` could not be resolved when calling Vimwiki2HTML. Resolves vimwiki/vimwiki#1193
This commit is contained in:
@@ -87,8 +87,9 @@ endfunction
|
||||
function! s:find_autoload_file(name) abort
|
||||
for path in split(&runtimepath, ',')
|
||||
let fname = path.'/autoload/vimwiki/'.a:name
|
||||
if glob(fname) !=? ''
|
||||
return fname
|
||||
let match = glob(fname)
|
||||
if match !=? ''
|
||||
return match
|
||||
endif
|
||||
endfor
|
||||
return ''
|
||||
|
||||
Reference in New Issue
Block a user