Prepend 'silent' to ':!' to avoid hit-enter prompt (#678)

Close #606

Fix for GVim on Windows.
This commit is contained in:
Jan Edmund Lazo 2017-09-19 00:53:35 -04:00 committed by Junegunn Choi
parent 05c8983d1a
commit 7f96c98b0a

View file

@ -802,7 +802,7 @@ function! s:bang(cmd, ...)
call writefile(['@echo off', cmd], batchfile)
let cmd = batchfile
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>"
finally
unlet g:_plug_bang