Stricter double-comma replacement

To handle paths ending with commas
This commit is contained in:
Junegunn Choi 2014-09-23 10:01:16 +09:00
parent cac2f9f439
commit 0489b5deed

View File

@ -287,7 +287,7 @@ function! s:reorg_rtp()
let rtps = map(s:loaded_names(), 's:rtp(g:plugs[v:val])') let rtps = map(s:loaded_names(), 's:rtp(g:plugs[v:val])')
let afters = filter(map(copy(rtps), 'globpath(v:val, "after")'), 'isdirectory(v:val)') let afters = filter(map(copy(rtps), 'globpath(v:val, "after")'), 'isdirectory(v:val)')
let &rtp = join(map(rtps, 's:escrtp(v:val)'), ',') let &rtp = join(map(rtps, 's:escrtp(v:val)'), ',')
\ . substitute(','.s:middle.',', ',,', ',', '') \ . substitute(','.s:middle.',', '^,,$', ',', '')
\ . join(map(afters, 's:escrtp(v:val)'), ',') \ . join(map(afters, 's:escrtp(v:val)'), ',')
let s:prtp = &rtp let s:prtp = &rtp