diff --git a/autoload/vimtex/util.vim b/autoload/vimtex/util.vim index d1df747..2fac0af 100644 --- a/autoload/vimtex/util.vim +++ b/autoload/vimtex/util.vim @@ -121,18 +121,15 @@ function! vimtex#util#execute(exe) " {{{1 endif " Set up command string based on the given system + let cmd = a:exe.cmd if has('win32') - let cmd = a:exe.cmd if null let cmd .= ' >nul' endif if bg - let cmd = '!start /b "' . cmd . '"' - else - let cmd = '!' . cmd + let cmd = 'start /b "' . cmd . '"' endif else - let cmd = '!' . a:exe.cmd if null let cmd .= ' &>/dev/null' endif @@ -149,9 +146,13 @@ function! vimtex#util#execute(exe) " {{{1 endif if silent - silent execute cmd + silent execute '!' cmd else - execute cmd + execute '!' cmd + endif + + if !has("gui_running") + redraw! endif if has('win32') && exists('savedShell') @@ -163,10 +164,6 @@ function! vimtex#util#execute(exe) " {{{1 if has_key(a:exe, 'wd') execute 'lcd ' . fnameescape(pwd) endif - - if !has("gui_running") - redraw! - endif endfunction function! vimtex#util#fnameescape(path) " {{{1