Ref. #443: Fixed forward search

This commit is contained in:
Karl Yngve Lervåg 2016-08-04 23:51:55 +02:00
parent be32f5651d
commit 1063e822d6

View File

@ -476,6 +476,16 @@ endfunction
" }}}2 " }}}2
function! s:zathura_alternative.forward_search(outfile) dict " {{{2 function! s:zathura_alternative.forward_search(outfile) dict " {{{2
let l:old = fnamemodify(b:vimtex.out(), ':r') . '.synctex.gz'
let l:new = fnamemodify(self.out, ':r') . '.synctex.gz'
if !filereadable(l:new)
if filereadable(l:old)
call rename(l:old, l:new)
else
return
endif
endif
let exe = {} let exe = {}
let exe.cmd = 'zathura --synctex-forward ' let exe.cmd = 'zathura --synctex-forward '
let exe.cmd .= line('.') let exe.cmd .= line('.')