From cf4f1a8d74430d0909696165f07e273727886cb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Mon, 4 Aug 2014 14:13:37 +0200 Subject: [PATCH] Fixed stupid minor bug --- autoload/latex.vim | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/autoload/latex.vim b/autoload/latex.vim index 7f6e210..2a56800 100644 --- a/autoload/latex.vim +++ b/autoload/latex.vim @@ -106,17 +106,16 @@ function! latex#reinit() " {{{1 endfunction function! latex#view(...) " {{{1 - if !filereadable(outfile) - echomsg "Can't view: Output file is not readable!" - return - endif - - " Define viewer arguments let args = ' ' if a:0 > 0 let args .= join(a:000, ' ') else - let args .= g:latex#data[b:latex.id].out() + let outfile = g:latex#data[b:latex.id].out() + if !filereadable(outfile) + echomsg "Can't view: Output file is not readable!" + return + endif + let args .= outfile endif let exe = {}