From 09f31c433a136450b9faa33b08fc3281bdea5acc Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Sun, 3 Jan 2021 14:09:55 +0100 Subject: Revert stylus provider --- autoload/polyglot/init.vim | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'autoload/polyglot') diff --git a/autoload/polyglot/init.vim b/autoload/polyglot/init.vim index 9d01b346..8af31ec2 100644 --- a/autoload/polyglot/init.vim +++ b/autoload/polyglot/init.vim @@ -21,19 +21,20 @@ func! polyglot#init#init() endfunc func! polyglot#init#is_disabled(caller, name, path) - if g:polyglot_initialized - return has_key(g:polyglot_is_disabled, a:name) + if !g:polyglot_initialized + if a:path[0:7] == "autoload" + let g:polyglot_initialized = 1 + + for p in globpath(&rtp, a:path, 0, 1) + if p != a:caller + exe "source " . p + return 1 + endif + endfor + endif endif - if a:path[0:7] == "autoload" - let g:polyglot_initialized = 1 - for p in globpath(&rtp, a:path, 0, 1) - if p != a:caller - exe "source " . p - return 1 - endif - endfor - endif + return has_key(g:polyglot_is_disabled, a:name) endfunc let g:polyglot_is_disabled = {} -- cgit v1.2.3