From a3c4221763fb421441d0511c52a29064fcb01c3f Mon Sep 17 00:00:00 2001 From: gmarik Date: Wed, 23 Mar 2011 12:55:45 -0500 Subject: [PATCH] Verify if bundle selected --- autoload/vundle/scripts.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index 652153e..98e68ea 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -25,7 +25,12 @@ func! vundle#scripts#complete(a,c,d) endf func! vundle#scripts#install() abort - let line = substitute(substitute(getline('.'), '\s*Bundle\s*','','g'), "'",'','g') + let l = getline('.') + if l !~ '^Bundle ' + echohl Error | echo 'Select Bundle to install'| echohl None + return 0 + end + let line = substitute(substitute(l, '\s*Bundle\s*','','g'), "'",'','g') call vundle#installer#install(0, line) endf