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
" Set up command string based on the given system
if has('win32')
let cmd = a:exe.cmd
if has('win32')
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