Minor fix

This commit is contained in:
Karl Yngve Lervåg 2016-10-02 15:56:19 +02:00
parent 57aeb0fe63
commit 2646e5fe64
2 changed files with 6 additions and 6 deletions

View File

@ -690,26 +690,26 @@ function! s:get_aux() dict " {{{1
endfunction
" }}}1
function! s:get_out() dict " {{{1
return self.ext('pdf')
function! s:get_out(...) dict " {{{1
return call(self.ext, ['pdf'] + a:000, self)
endfunction
" }}}1
function! s:get_ext(ext) dict " {{{1
function! s:get_ext(ext, ...) dict " {{{1
" First check build dir (latexmk -output_directory option)
if g:vimtex_latexmk_build_dir !=# ''
let cand = g:vimtex_latexmk_build_dir . '/' . self.name . '.' . a:ext
if g:vimtex_latexmk_build_dir[0] !=# '/'
let cand = self.root . '/' . cand
endif
if filereadable(cand)
if a:0 > 0 || filereadable(cand)
return fnamemodify(cand, ':p')
endif
endif
" Next check for file in project root folder
let cand = self.root . '/' . self.name . '.' . a:ext
if filereadable(cand)
if a:0 > 0 || filereadable(cand)
return fnamemodify(cand, ':p')
endif

View File

@ -19,7 +19,7 @@ function! vimtex#view#common#use_temp_files_p(viewer) " {{{1
let a:viewer.synctex = fnamemodify(a:viewer.out, ':r') . '.synctex.gz'
let a:viewer.copy_files = function('s:copy_files')
else
let a:viewer.out = b:vimtex.out()
let a:viewer.out = b:vimtex.out(1)
let a:viewer.synctex = fnamemodify(a:viewer.out, ':r') . '.synctex.gz'
endif