From 5adaa6b3c47caacc56691b53cb34f94195fdd6d4 Mon Sep 17 00:00:00 2001 From: Randy Morris Date: Sat, 5 Nov 2011 17:24:20 -0400 Subject: [PATCH] give BundleClean prompt a default value of 'y' Also save/restore input so potential mappings aren't broken. --- autoload/vundle/installer.vim | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index c002ef6..5fb371e 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -139,8 +139,15 @@ func! vundle#installer#clean(bang) abort call vundle#scripts#view('clean', headers, names) redraw - if (a:bang || empty(names) || input('Continue? [y/n]: ') =~? 'y') + if (a:bang || empty(names)) call s:process(a:bang, 'D') + else + call inputsave() + let response = input('Continue? [Y/n]: ') + call inputrestore() + if (response =~? 'y' || response == '') + call s:process(a:bang, 'D') + endif endif endf