From a5d4b18f30aba1f69f933b719eecbbb8fec5bf85 Mon Sep 17 00:00:00 2001 From: Jacobo de Vera Date: Sun, 5 Apr 2015 22:29:44 +0200 Subject: [PATCH] Exclude empty dictionaries from bundles to operate on When Running PluginInstall or PluginUpdate with a list of plugins and some of those have failed name validation, they are returned as empty dictionaries. Exclude those before checking the size of the list so that if all given plugin names failed, then the empty list message is shown. --- autoload/vundle/installer.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index c10721d..90e6b02 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -18,6 +18,8 @@ func! vundle#installer#new(bang, ...) abort let bundles = map(copy(a:000), 'vundle#config#bundle(v:val, {})') endif + let bundles = filter(copy(bundles), '!empty(v:val)') + if empty(bundles) echoerr 'No bundles were selected for operation' return