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 /syntax/basic | |
parent | 20b31f533764c4c32582124de8d8a6f6c9499c8a (diff) | |
download | vim-polyglot-d73c4d156279bfbc2ea9fafcbacca5fc2bd6cfd1.tar.gz vim-polyglot-d73c4d156279bfbc2ea9fafcbacca5fc2bd6cfd1.zip |
Fix recursive loading, closes #605
Diffstat (limited to 'syntax/basic')
-rw-r--r-- | syntax/basic/class.vim | 4 | ||||
-rw-r--r-- | syntax/basic/cluster.vim | 4 | ||||
-rw-r--r-- | syntax/basic/decorator.vim | 4 | ||||
-rw-r--r-- | syntax/basic/doc.vim | 4 | ||||
-rw-r--r-- | syntax/basic/function.vim | 4 | ||||
-rw-r--r-- | syntax/basic/identifiers.vim | 4 | ||||
-rw-r--r-- | syntax/basic/keyword.vim | 4 | ||||
-rw-r--r-- | syntax/basic/literal.vim | 4 | ||||
-rw-r--r-- | syntax/basic/members.vim | 4 | ||||
-rw-r--r-- | syntax/basic/object.vim | 4 | ||||
-rw-r--r-- | syntax/basic/patch.vim | 4 | ||||
-rw-r--r-- | syntax/basic/reserved.vim | 4 | ||||
-rw-r--r-- | syntax/basic/symbols.vim | 4 | ||||
-rw-r--r-- | syntax/basic/type.vim | 4 |
14 files changed, 42 insertions, 14 deletions
diff --git a/syntax/basic/class.vim b/syntax/basic/class.vim index dea703aa..4fc03dcf 100644 --- a/syntax/basic/class.vim +++ b/syntax/basic/class.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/class.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, 'syntax/basic/class.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/cluster.vim b/syntax/basic/cluster.vim index f5eb59d1..017c4ba9 100644 --- a/syntax/basic/cluster.vim +++ b/syntax/basic/cluster.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/cluster.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, 'syntax/basic/cluster.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/decorator.vim b/syntax/basic/decorator.vim index 7f5456cd..fc4b7e4d 100644 --- a/syntax/basic/decorator.vim +++ b/syntax/basic/decorator.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/decorator.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, 'syntax/basic/decorator.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/doc.vim b/syntax/basic/doc.vim index 2bf5d614..81af2a9a 100644 --- a/syntax/basic/doc.vim +++ b/syntax/basic/doc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/doc.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, 'syntax/basic/doc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/function.vim b/syntax/basic/function.vim index ac94b9a1..c4ffef90 100644 --- a/syntax/basic/function.vim +++ b/syntax/basic/function.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/function.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, 'syntax/basic/function.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/identifiers.vim b/syntax/basic/identifiers.vim index b03df011..ce733f3e 100644 --- a/syntax/basic/identifiers.vim +++ b/syntax/basic/identifiers.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/identifiers.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, 'syntax/basic/identifiers.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/keyword.vim b/syntax/basic/keyword.vim index ddb4e8a1..45e45768 100644 --- a/syntax/basic/keyword.vim +++ b/syntax/basic/keyword.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/keyword.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, 'syntax/basic/keyword.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/literal.vim b/syntax/basic/literal.vim index 6f092fcc..8458dcc6 100644 --- a/syntax/basic/literal.vim +++ b/syntax/basic/literal.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/literal.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, 'syntax/basic/literal.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/members.vim b/syntax/basic/members.vim index 7362eaf9..65366dac 100644 --- a/syntax/basic/members.vim +++ b/syntax/basic/members.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/members.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, 'syntax/basic/members.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/object.vim b/syntax/basic/object.vim index 6f5d1f28..869cf063 100644 --- a/syntax/basic/object.vim +++ b/syntax/basic/object.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/object.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, 'syntax/basic/object.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/patch.vim b/syntax/basic/patch.vim index a2ebd1da..9d97817c 100644 --- a/syntax/basic/patch.vim +++ b/syntax/basic/patch.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/patch.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, 'syntax/basic/patch.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/reserved.vim b/syntax/basic/reserved.vim index 0cfb36ac..3ba5c8ec 100644 --- a/syntax/basic/reserved.vim +++ b/syntax/basic/reserved.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/reserved.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, 'syntax/basic/reserved.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/symbols.vim b/syntax/basic/symbols.vim index 15490f80..bc8db0dc 100644 --- a/syntax/basic/symbols.vim +++ b/syntax/basic/symbols.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/symbols.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, 'syntax/basic/symbols.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/type.vim b/syntax/basic/type.vim index 378ecafe..9785545d 100644 --- a/syntax/basic/type.vim +++ b/syntax/basic/type.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/type.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, 'syntax/basic/type.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish |