Skip to content

Commit 3ec671e

Browse files
committed
Always skip pack/{}/start/{} when has('packages')
This lets you explicitly pass the path in for backwards compatibility without worrying about the Vim version.
1 parent c636c19 commit 3ec671e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

autoload/pathogen.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ function! pathogen#infect(...) abort
2525
if a:0
2626
let paths = filter(reverse(copy(a:000)), 'type(v:val) == type("")')
2727
else
28-
let paths = ['bundle/{}']
29-
if !has('packages')
30-
call add(paths, 'pack/{}/start/{}')
31-
endif
28+
let paths = ['bundle/{}', 'pack/{}/start/{}']
29+
endif
30+
if has('packages')
31+
call filter(paths, 'v:val !~# "^pack/[^/]*/start/[^/]*$"')
3232
endif
3333
let static = '^\%([$~\\/]\|\w:[\\/]\)[^{}*]*[\/]$'
3434
for path in filter(copy(paths), 'v:val =~# static')

0 commit comments

Comments
 (0)