diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-04-28 01:09:08 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-04-28 01:09:08 +0200 |
commit | c7b5826d53f3f4fe31e8168e1d8c6d7b19e60f4b (patch) | |
tree | 18b7ceacc639cd998d9ea1b82dc6ec330bea4a4b /autoload/vimtex/view/common.vim | |
parent | 1d348d0c2db81becf134d86d0513b840e7d66435 (diff) | |
download | vim-polyglot-c7b5826d53f3f4fe31e8168e1d8c6d7b19e60f4b.tar.gz vim-polyglot-c7b5826d53f3f4fe31e8168e1d8c6d7b19e60f4b.zip |
Update
Diffstat (limited to 'autoload/vimtex/view/common.vim')
-rw-r--r-- | autoload/vimtex/view/common.vim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/autoload/vimtex/view/common.vim b/autoload/vimtex/view/common.vim index ca39cf0a..348dc899 100644 --- a/autoload/vimtex/view/common.vim +++ b/autoload/vimtex/view/common.vim @@ -153,9 +153,10 @@ function! s:xwin_template.xwin_exists() dict abort " {{{1 " If xwin_id is unset, check if matching viewer windows exist " if self.xwin_id == 0 - if has_key(self, 'get_pid') + let l:pid = has_key(self, 'get_pid') ? self.get_pid() : 0 + if l:pid > 0 let cmd = 'xdotool search' - \ . ' --all --pid ' . self.get_pid() + \ . ' --all --pid ' . l:pid \ . ' --name ' . fnamemodify(self.out(), ':t') let self.xwin_id = get(split(system(cmd), '\n'), 0) else |