diff --git a/autoload/vimtex/latexmk.vim b/autoload/vimtex/latexmk.vim index 33d8d89..2a27683 100644 --- a/autoload/vimtex/latexmk.vim +++ b/autoload/vimtex/latexmk.vim @@ -77,7 +77,10 @@ endfunction " }}}1 function! vimtex#latexmk#callback(status) " {{{1 call vimtex#latexmk#errors_open(0) - redraw! + + if has_key(g:vimtex#data[b:vimtex.id].viewer, 'latexmk_callback') + call g:vimtex#data[b:vimtex.id].viewer.latexmk_callback() + endif echohl ModeMsg echon "latexmk compile: " @@ -90,10 +93,6 @@ function! vimtex#latexmk#callback(status) " {{{1 endif echohl None - if has_key(g:vimtex#data[b:vimtex.id].viewer, 'latexmk_callback') - call g:vimtex#data[b:vimtex.id].viewer.latexmk_callback() - endif - return "" endfunction