Differ between bg and silent (fixes #51)

This commit is contained in:
Karl Yngve Lervåg 2014-08-26 08:05:18 +02:00
parent 0dc505bd58
commit 116fb46e51
2 changed files with 6 additions and 3 deletions

View File

@ -121,6 +121,7 @@ function! latex#latexmk#compile() " {{{1
let exe.null = 0
if !g:latex_latexmk_continuous && !g:latex_latexmk_background
let exe.bg = 0
let exe.silent = 0
endif
let exe.cmd = data.cmds.compile
call latex#util#execute(exe)

View File

@ -99,6 +99,7 @@ function! latex#util#execute(exe) " {{{1
"
" exe.cmd String String that contains the command to run
" exe.bg 0 or 1 Run in background or not
" exe.silent 0 or 1 Show output or not
" exe.null 0 or 1 Send output to /dev/null
" exe.wd String Run command in provided working directory
"
@ -112,6 +113,7 @@ function! latex#util#execute(exe) " {{{1
return
endif
let bg = has_key(a:exe, 'bg') ? a:exe.bg : 1
let silent = has_key(a:exe, 'silent') ? a:exe.silent : 1
let null = has_key(a:exe, 'null') ? a:exe.null : 1
" Change directory if wanted
@ -140,7 +142,7 @@ function! latex#util#execute(exe) " {{{1
endif
endif
if bg
if silent
silent execute cmd
else
execute cmd