From 3ec671e112c760e68eee1e3cc5eeb9408448dab4 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 23 May 2017 17:39:30 -0400 Subject: [PATCH] Always skip pack/{}/start/{} when has('packages') This lets you explicitly pass the path in for backwards compatibility without worrying about the Vim version. --- autoload/pathogen.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autoload/pathogen.vim b/autoload/pathogen.vim index 91e1cb0..70b998d 100644 --- a/autoload/pathogen.vim +++ b/autoload/pathogen.vim @@ -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')