From 2646e5fe647e37a9383ff001844a61103e530721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Sun, 2 Oct 2016 15:56:19 +0200 Subject: [PATCH] Minor fix --- autoload/vimtex.vim | 10 +++++----- autoload/vimtex/view/common.vim | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/autoload/vimtex.vim b/autoload/vimtex.vim index 64ae0b1..9dbf0cd 100644 --- a/autoload/vimtex.vim +++ b/autoload/vimtex.vim @@ -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 diff --git a/autoload/vimtex/view/common.vim b/autoload/vimtex/view/common.vim index 1be7dcb..33208b9 100644 --- a/autoload/vimtex/view/common.vim +++ b/autoload/vimtex/view/common.vim @@ -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