From 714e590663533e915c12ca4ea45d02b8df1d0398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Tue, 14 Apr 2015 17:08:36 +0200 Subject: [PATCH] Fix viewer issue (#154) --- autoload/vimtex/latexmk.vim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/autoload/vimtex/latexmk.vim b/autoload/vimtex/latexmk.vim index 1abbbc8..19e8149 100644 --- a/autoload/vimtex/latexmk.vim +++ b/autoload/vimtex/latexmk.vim @@ -80,7 +80,8 @@ endfunction function! vimtex#latexmk#callback(status) " {{{1 call vimtex#latexmk#errors_open(0) - if has_key(g:vimtex#data[b:vimtex.id].viewer, 'latexmk_callback') + if g:vimtex_view_enabled + \ && has_key(g:vimtex#data[b:vimtex.id].viewer, 'latexmk_callback') call g:vimtex#data[b:vimtex.id].viewer.latexmk_callback() endif @@ -402,7 +403,9 @@ function! s:latexmk_build_cmd(data) " {{{1 let s:first_callback = 1 endif - if has_key(g:vimtex#data[b:vimtex.id].viewer, 'latexmk_append_argument') + if g:vimtex_view_enabled + \ && has_key(g:vimtex#data[b:vimtex.id].viewer, + \ 'latexmk_append_argument') let cmd .= g:vimtex#data[b:vimtex.id].viewer.latexmk_append_argument() endif