diff --git a/autoload/vimtex/view.vim b/autoload/vimtex/view.vim index 7b72328..7ff383d 100644 --- a/autoload/vimtex/view.vim +++ b/autoload/vimtex/view.vim @@ -469,7 +469,7 @@ endfunction function! s:focus_viewer() dict " {{{1 if !executable('xdotool') | return | endif - if self.xwin_exists() + if self.xwin_id > 0 silent call system('xdotool windowfocus ' . self.xwin_id . ' --sync') endif endfunction