Skip to content

regression: Noticeable latency of Zathura backward search after a recently merged commit #2150

@moetayuko

Description

@moetayuko

Description

The cursor should move right after ctrl+mouse click. However, after 8aa70e4 there's a nearly 1-second latency.

ps: the latency depends on the performance of vim. No additional plugins that potentially slow down vim are loaded with the minimal.vim below, so the latency is relatively low (but still noticeable and enough to reproduce the issue).

Steps to reproduce

minimal.vim

call plug#begin()
 Plug 'lervag/vimtex'
call plug#end()

set nocp

call remote_startserver('VIM')
let g:vimtex_view_method = 'zathura'

minimal.tex

\documentclass{minimal}
\begin{document}
Hello world!
\end{document}
  1. vim -u minimal.vim minimal.tex
  2. ctrl+mouse click someplace in Zathura

Expected behavior

Workflow before (expected):

  1. ctrl+mouse click someplace in Zathura, vim cursor moved right after that.
  2. Manually activate vim window and continue editing.

Actual behavior

Workflow after:

  1. ctrl+mouse click someplace in Zathura, vim highlighted line moved right after that, but the cursor disappears.
  2. If activating vim window before the cursor reappears, a terminal control sequence ^[[I appears at the last line of the text, but the cursor is still invisible.
  3. The cursor reappears after 1s, but Zathura window automatically gets activated at the same time.
  4. One have to activate vim window again to continue edit.

So the problems are:

  1. Long delay of the cursor after triggering a backward search
  2. Weird behavior of activated window

and they got fixed after reverting the commit above.

Do you use a latexmkrc file?

No

VimtexInfo

System info
  OS: Arch Linux
  Vim version: VIM 8.2 (1-2891)
  Has clientserver: true
  Servername: VIM

VimTeX project: minimal
  base: minimal.tex
  root: /home/dianlujitao/test
  tex: /home/dianlujitao/test/minimal.tex
  main parser: current file verified
  document class: minimal
  compiler: latexmk
    engine: -pdf
    options:
      -verbose
      -file-line-error
      -synctex=1
      -interaction=nonstopmode
    callback: 1
    continuous: 1
    executable: latexmk
    process: 
      jobid: process 3036321 run
      output: /tmp/veh55NQ/2
      cmd: max_print_line=2000 latexmk -verbose -file-line-error -synctex=1 -interaction=nonstopmode -pdf -pvc -e '$new_viewer_always = "0"' -e '$pdf_previewer = "zathura  -x \"/usr/bin/vim --servername VIM --remote-expr \"\\\"\"vimtex#view#reverse_goto(\%{line}, '"'"'\%{input}'"'"')\"\\\"\"\" \%S"' -e '$compiling_cmd = ($compiling_cmd ? $compiling_cmd . " ; " : "") . "echo vimtex_compiler_callback_compiling"' -e '$success_cmd = ($success_cmd ? $success_cmd . " ; " : "") . "echo vimtex_compiler_callback_success"' -e '$failure_cmd = ($failure_cmd ? $failure_cmd . " ; " : "") . "echo vimtex_compiler_callback_failure"' 'minimal.tex'
      pid: 3036321
  viewer: Zathura
    xwin id: 125829123
  qf method: LaTeX logfile

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions