From 21326e161caf54536fd7d7c1778e4c5fd0f686a7 Mon Sep 17 00:00:00 2001 From: "Jeremy Pallats/starcraft.man" Date: Fri, 21 Mar 2014 19:05:05 -0400 Subject: [PATCH] Fixes issues #407. --- autoload/vundle/installer.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index 48fae6d..55dbeff 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -101,7 +101,13 @@ func! vundle#installer#install(bang, name) abort if !isdirectory(g:bundle_dir) | call mkdir(g:bundle_dir, 'p') | endif let n = substitute(a:name,"['".'"]\+','','g') - let b = filter(copy(g:bundles), 'v:val.name_spec == n')[0] + let matched = filter(copy(g:bundles), 'v:val.name_spec == n') + + if len(matched) > 0 + let b = matched[0] + else + let b = vundle#config#init_bundle(a:name, {}) + endif return s:sync(a:bang, b) endf