From 79fa8561014deb9f83ac48f4677ff783fbef8834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Fri, 2 Oct 2015 22:56:19 +0200 Subject: [PATCH] Fix strange sleep problem (fixes #236) --- autoload/vimtex/view.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autoload/vimtex/view.vim b/autoload/vimtex/view.vim index 611a78e..9c36e59 100644 --- a/autoload/vimtex/view.vim +++ b/autoload/vimtex/view.vim @@ -191,6 +191,8 @@ function! s:mupdf.start(outfile) dict " {{{2 call vimtex#util#execute(exe) let self.cmd_start = exe.cmd + sleep 300m + call self.xwin_get_id() call self.xwin_send_keys(g:vimtex_view_mupdf_send_keys) call self.forward_search(a:outfile) @@ -346,6 +348,8 @@ function! s:zathura.start(outfile) dict " {{{2 call vimtex#util#execute(exe) let self.cmd_start = exe.cmd + sleep 300m + call self.xwin_get_id() call self.forward_search(a:outfile) endfunction @@ -405,7 +409,6 @@ endfunction function! s:xwin_get_id() dict " {{{1 if !executable('xdotool') | return 0 | endif if self.xwin_id > 0 | return 0 | endif - sleep 500m let cmd = 'xdotool search --class ' . self.class let xwin_ids = split(system(cmd), '\n')