Generalize functions: clean and errors_inquire
This commit is contained in:
parent
136bb86896
commit
aeeb52be1a
@ -119,8 +119,8 @@ function! vimtex#latexmk#callback(status) " {{{1
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" }}}1
|
" }}}1
|
||||||
function! vimtex#latexmk#clean(full) " {{{1
|
function! vimtex#latexmk#clean(full, ...) " {{{1
|
||||||
if b:vimtex.pid
|
if b:vimtex.pid && a:0 == 0
|
||||||
silent call vimtex#latexmk#stop()
|
silent call vimtex#latexmk#stop()
|
||||||
let l:restart = 1
|
let l:restart = 1
|
||||||
let s:silence_next_callback = 1
|
let s:silence_next_callback = 1
|
||||||
@ -139,7 +139,7 @@ function! vimtex#latexmk#clean(full) " {{{1
|
|||||||
let cmd .= ' -outdir=' . g:vimtex_latexmk_build_dir
|
let cmd .= ' -outdir=' . g:vimtex_latexmk_build_dir
|
||||||
endif
|
endif
|
||||||
let cmd .= a:full ? ' -C ' : ' -c '
|
let cmd .= a:full ? ' -C ' : ' -c '
|
||||||
let cmd .= vimtex#util#shellescape(b:vimtex.base)
|
let cmd .= vimtex#util#shellescape(a:0 > 0 ? a:1 : b:vimtex.base)
|
||||||
call vimtex#util#execute({'cmd' : cmd})
|
call vimtex#util#execute({'cmd' : cmd})
|
||||||
let b:vimtex.cmd_latexmk_clean = cmd
|
let b:vimtex.cmd_latexmk_clean = cmd
|
||||||
|
|
||||||
@ -147,8 +147,10 @@ function! vimtex#latexmk#clean(full) " {{{1
|
|||||||
silent call vimtex#latexmk#compile()
|
silent call vimtex#latexmk#compile()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if !a:0 == 0
|
||||||
call vimtex#echo#status(['latexmk clean: ',
|
call vimtex#echo#status(['latexmk clean: ',
|
||||||
\ ['VimtexSuccess', 'finished' . (a:full ? ' (full)' : '')]])
|
\ ['VimtexSuccess', 'finished' . (a:full ? ' (full)' : '')]])
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" }}}1
|
" }}}1
|
||||||
@ -285,14 +287,14 @@ endfunction
|
|||||||
let s:open_quickfix_window = 0
|
let s:open_quickfix_window = 0
|
||||||
|
|
||||||
" }}}1
|
" }}}1
|
||||||
function! vimtex#latexmk#errors_inquire() " {{{1
|
function! vimtex#latexmk#errors_inquire(...) " {{{1
|
||||||
if !exists('b:vimtex') | return | endif
|
if !exists('b:vimtex') | return | endif
|
||||||
|
|
||||||
let log = b:vimtex.log()
|
let log = a:0 > 0 ? a:1.log : b:vimtex.log()
|
||||||
if empty(log) | return 0 | endif
|
if empty(log) | return 0 | endif
|
||||||
|
|
||||||
" Save paths for fixing quickfix entries
|
" Save paths for fixing quickfix entries
|
||||||
let s:qf_main = b:vimtex.tex
|
let s:qf_main = a:0 > 0 ? a:1.tex : b:vimtex.tex
|
||||||
let s:qf_root = b:vimtex.root
|
let s:qf_root = b:vimtex.root
|
||||||
|
|
||||||
execute 'cgetfile ' . fnameescape(log)
|
execute 'cgetfile ' . fnameescape(log)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user