Skip to content

Commit

Permalink
Only send synctex-forward when line number changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tsung-ju committed Jul 7, 2024
1 parent 8342829 commit 1da7048
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions autoload/vimtex/compiler/texpresso.vim
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ endfunction
function! s:compiler.texpresso_synctex_forward() abort dict "{{{1
let l:path = fnamemodify(bufname(), ":p")
let l:lnum = getpos('.')[1]
if get(self, 'texpresso_synctex_forward_previous', v:null) == [l:path, l:lnum]
return
endif
let self.texpresso_synctex_forward_previous = [l:path, l:lnum]
call self.texpresso_send("synctex-forward", l:path, l:lnum - 1)
endfunction
" }}}1
Expand Down

0 comments on commit 1da7048

Please sign in to comment.