mirror of
https://github.com/tpope/vim-pathogen.git
synced 2026-05-28 00:21:02 +02:00
Always skip pack/{}/start/{} when has('packages')
This lets you explicitly pass the path in for backwards compatibility without worrying about the Vim version.
This commit is contained in:
@@ -25,10 +25,10 @@ function! pathogen#infect(...) abort
|
||||
if a:0
|
||||
let paths = filter(reverse(copy(a:000)), 'type(v:val) == type("")')
|
||||
else
|
||||
let paths = ['bundle/{}']
|
||||
if !has('packages')
|
||||
call add(paths, 'pack/{}/start/{}')
|
||||
endif
|
||||
let paths = ['bundle/{}', 'pack/{}/start/{}']
|
||||
endif
|
||||
if has('packages')
|
||||
call filter(paths, 'v:val !~# "^pack/[^/]*/start/[^/]*$"')
|
||||
endif
|
||||
let static = '^\%([$~\\/]\|\w:[\\/]\)[^{}*]*[\/]$'
|
||||
for path in filter(copy(paths), 'v:val =~# static')
|
||||
|
||||
Reference in New Issue
Block a user