Skip to content

Commit

Permalink
Use a dictionary to track done bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Mar 18, 2014
1 parent 6982390 commit c9ca377
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions autoload/pathogen.vim
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@ endfunction " }}}1
function! pathogen#incubate(...) abort " {{{1
let sep = pathogen#separator()
let name = a:0 ? a:1 : 'bundle/{}'
if "\n".s:done_bundles =~# "\\M\n".name."\n"
if has_key(s:done_bundles, name)
return ""
endif
let s:done_bundles .= name . "\n"
let s:done_bundles[name] = 1
let list = []
for dir in pathogen#split(&rtp)
if dir =~# '\<after$'
Expand Down Expand Up @@ -216,7 +216,8 @@ function! pathogen#runtime_append_all_bundles(...) abort " {{{1
return call('pathogen#incubate', map(copy(a:000),'v:val . "/{}"'))
endfunction

let s:done_bundles = ''
let s:done_bundles = {}

" }}}1

" Invoke :helptags on all non-$VIM doc directories in runtimepath.
Expand Down

0 comments on commit c9ca377

Please sign in to comment.