give BundleClean prompt a default value of 'y'

Also save/restore input so potential mappings aren't broken.
This commit is contained in:
Randy Morris 2011-11-05 17:24:20 -04:00
parent b0d3b6f8f6
commit 5adaa6b3c4

View File

@ -139,8 +139,15 @@ func! vundle#installer#clean(bang) abort
call vundle#scripts#view('clean', headers, names) call vundle#scripts#view('clean', headers, names)
redraw redraw
if (a:bang || empty(names) || input('Continue? [y/n]: ') =~? 'y') if (a:bang || empty(names))
call s:process(a:bang, 'D') 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 endif
endf endf