From 48d0bc7556ed5d0f697c814350dbcc101c2c025d Mon Sep 17 00:00:00 2001 From: ichizok Date: Sun, 25 Oct 2020 19:10:44 +0900 Subject: Fix the filter of 'rtp' (#606) On Windows, should handle both slash and backslash as the path separator in checking a path in 'rtp'. --- autoload/polyglot/util.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'autoload') diff --git a/autoload/polyglot/util.vim b/autoload/polyglot/util.vim index 6d5caf88..f0fd0388 100644 --- a/autoload/polyglot/util.vim +++ b/autoload/polyglot/util.vim @@ -10,7 +10,7 @@ if exists('g:polyglot_disabled') let base = split(pkg, '\.') if len(base) > 0 let s:disabled_packages[pkg] = 1 - call add(s:new_polyglot_disabled, base[0]) + call add(s:new_polyglot_disabled, base[0]) endif endfor else @@ -22,7 +22,7 @@ let s:base = expand(':p:h:h:h') func polyglot#util#Filter(idx, val) let val = fnamemodify(a:val . '/', ':p:h') - return resolve(val) !=? s:base && stridx(val, $VIMRUNTIME) == -1 && val !~? '/after$' + return resolve(val) !=? s:base && stridx(val, $VIMRUNTIME) == -1 && val !~? '[/\\]after$' endfunc let s:rtp = join(filter(split(&rtp, ','), function('polyglot#util#Filter')), ',') -- cgit v1.2.3