mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-12 13:33:49 -05:00
Fix recursive loading, closes #605
This commit is contained in:
@@ -295,7 +295,9 @@ def copy_file(name, src, dest)
|
||||
open(dest, "w") do |output|
|
||||
if dest.match?(/\.vim$/) && !dest.match('after/')
|
||||
output << <<~EOF
|
||||
let files = filter(globpath(&rtp, '#{dest}', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" })
|
||||
let s:base = expand("<sfile>:h:h")
|
||||
let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
|
||||
let files = filter(globpath(&rtp, '#{dest}', 1, 1), Filter)
|
||||
if len(files) > 0
|
||||
exec 'source ' . files[0]
|
||||
finish
|
||||
|
||||
Reference in New Issue
Block a user