mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-09 12:03:53 -05:00
Fix the filter of 'rtp' (#606)
On Windows, should handle both slash and backslash as the path separator in checking a path in 'rtp'.
This commit is contained in:
@@ -22,7 +22,7 @@ let s:base = expand('<sfile>:p:h:h:h')
|
|||||||
|
|
||||||
func polyglot#util#Filter(idx, val)
|
func polyglot#util#Filter(idx, val)
|
||||||
let val = fnamemodify(a:val . '/', ':p:h')
|
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
|
endfunc
|
||||||
|
|
||||||
let s:rtp = join(filter(split(&rtp, ','), function('polyglot#util#Filter')), ',')
|
let s:rtp = join(filter(split(&rtp, ','), function('polyglot#util#Filter')), ',')
|
||||||
|
|||||||
Reference in New Issue
Block a user