Prepend 'silent' to ':!' to avoid hit-enter prompt

Close #606

Fix for GVim on Windows.
This commit is contained in:
Jan Edmund Lazo 2017-09-18 23:46:56 -04:00
parent 05c8983d1a
commit 6e1837cc16

View File

@ -802,7 +802,7 @@ function! s:bang(cmd, ...)
call writefile(['@echo off', cmd], batchfile) call writefile(['@echo off', cmd], batchfile)
let cmd = batchfile let cmd = batchfile
endif endif
let g:_plug_bang = '!'.escape(cmd, '#!%') let g:_plug_bang = (s:is_win && has('gui_running') ? 'silent ' : '').'!'.escape(cmd, '#!%')
execute "normal! :execute g:_plug_bang\<cr>\<cr>" execute "normal! :execute g:_plug_bang\<cr>\<cr>"
finally finally
unlet g:_plug_bang unlet g:_plug_bang