Minor update of util#execute

This commit is contained in:
Karl Yngve Lervåg 2015-04-02 20:05:07 +02:00
parent ef80217ffc
commit f70279c4ed

View File

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