summaryrefslogtreecommitdiffstats
path: root/indent/kotlin.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-10-24 23:50:54 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-10-24 23:50:54 +0200
commitd73c4d156279bfbc2ea9fafcbacca5fc2bd6cfd1 (patch)
tree02e5ede89ee8e6066dc8c4e11033c8ec1684a1dc /indent/kotlin.vim
parent20b31f533764c4c32582124de8d8a6f6c9499c8a (diff)
downloadvim-polyglot-d73c4d156279bfbc2ea9fafcbacca5fc2bd6cfd1.tar.gz
vim-polyglot-d73c4d156279bfbc2ea9fafcbacca5fc2bd6cfd1.zip
Fix recursive loading, closes #605
Diffstat (limited to 'indent/kotlin.vim')
-rw-r--r--indent/kotlin.vim4
1 files changed, 3 insertions, 1 deletions
diff --git a/indent/kotlin.vim b/indent/kotlin.vim
index fca5e30d..fdb8891c 100644
--- a/indent/kotlin.vim
+++ b/indent/kotlin.vim
@@ -1,4 +1,6 @@
-let files = filter(globpath(&rtp, 'indent/kotlin.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, 'indent/kotlin.vim', 1, 1), Filter)
if len(files) > 0
exec 'source ' . files[0]
finish