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:
Thomas Leyh
2021-12-17 22:34:13 +01:00
committed by Tinmarino
parent 95dd2e0d2c
commit 064a8f7ade
2 changed files with 5 additions and 2 deletions
+3 -2
View File
@@ -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 ''