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:
Tim Pope
2017-05-23 17:39:30 -04:00
parent c636c19f6a
commit 3ec671e112
+4 -4
View File
@@ -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')