From f70279c4ededa0233776c5e90ca2650cbda1911e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Thu, 2 Apr 2015 20:05:07 +0200 Subject: [PATCH] Minor update of util#execute --- autoload/vimtex/util.vim | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) 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