diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-24 23:50:54 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-24 23:50:54 +0200 |
commit | d73c4d156279bfbc2ea9fafcbacca5fc2bd6cfd1 (patch) | |
tree | 02e5ede89ee8e6066dc8c4e11033c8ec1684a1dc /autoload/vital | |
parent | 20b31f533764c4c32582124de8d8a6f6c9499c8a (diff) | |
download | vim-polyglot-d73c4d156279bfbc2ea9fafcbacca5fc2bd6cfd1.tar.gz vim-polyglot-d73c4d156279bfbc2ea9fafcbacca5fc2bd6cfd1.zip |
Fix recursive loading, closes #605
Diffstat (limited to 'autoload/vital')
-rw-r--r-- | autoload/vital/_crystal.vim | 4 | ||||
-rw-r--r-- | autoload/vital/_crystal/ColorEcho.vim | 4 | ||||
-rw-r--r-- | autoload/vital/_crystal/Data/List.vim | 4 | ||||
-rw-r--r-- | autoload/vital/_crystal/Data/String.vim | 4 | ||||
-rw-r--r-- | autoload/vital/_crystal/Process.vim | 4 | ||||
-rw-r--r-- | autoload/vital/_crystal/Web/JSON.vim | 4 | ||||
-rw-r--r-- | autoload/vital/crystal.vim | 4 |
7 files changed, 21 insertions, 7 deletions
diff --git a/autoload/vital/_crystal.vim b/autoload/vital/_crystal.vim index ffa30240..b8ac5d32 100644 --- a/autoload/vital/_crystal.vim +++ b/autoload/vital/_crystal.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/vital/_crystal.vim', 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, 'autoload/vital/_crystal.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/vital/_crystal/ColorEcho.vim b/autoload/vital/_crystal/ColorEcho.vim index 58996327..59c0ec88 100644 --- a/autoload/vital/_crystal/ColorEcho.vim +++ b/autoload/vital/_crystal/ColorEcho.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/vital/_crystal/ColorEcho.vim', 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, 'autoload/vital/_crystal/ColorEcho.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/vital/_crystal/Data/List.vim b/autoload/vital/_crystal/Data/List.vim index 06461525..b2045a2a 100644 --- a/autoload/vital/_crystal/Data/List.vim +++ b/autoload/vital/_crystal/Data/List.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/vital/_crystal/Data/List.vim', 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, 'autoload/vital/_crystal/Data/List.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/vital/_crystal/Data/String.vim b/autoload/vital/_crystal/Data/String.vim index 7e6ced35..8f6ddf3e 100644 --- a/autoload/vital/_crystal/Data/String.vim +++ b/autoload/vital/_crystal/Data/String.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/vital/_crystal/Data/String.vim', 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, 'autoload/vital/_crystal/Data/String.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/vital/_crystal/Process.vim b/autoload/vital/_crystal/Process.vim index a7bbedad..315a4343 100644 --- a/autoload/vital/_crystal/Process.vim +++ b/autoload/vital/_crystal/Process.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/vital/_crystal/Process.vim', 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, 'autoload/vital/_crystal/Process.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/vital/_crystal/Web/JSON.vim b/autoload/vital/_crystal/Web/JSON.vim index 891bd2dc..c17269cf 100644 --- a/autoload/vital/_crystal/Web/JSON.vim +++ b/autoload/vital/_crystal/Web/JSON.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/vital/_crystal/Web/JSON.vim', 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, 'autoload/vital/_crystal/Web/JSON.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/vital/crystal.vim b/autoload/vital/crystal.vim index ca8c320e..7674c4ef 100644 --- a/autoload/vital/crystal.vim +++ b/autoload/vital/crystal.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/vital/crystal.vim', 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, 'autoload/vital/crystal.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish |