From d73c4d156279bfbc2ea9fafcbacca5fc2bd6cfd1 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Sat, 24 Oct 2020 23:50:54 +0200 Subject: Fix recursive loading, closes #605 --- syntax/php.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'syntax/php.vim') diff --git a/syntax/php.vim b/syntax/php.vim index ef838254..79302961 100644 --- a/syntax/php.vim +++ b/syntax/php.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/php.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand(":h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/php.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish -- cgit v1.2.3