Improve compatibility with older Vim
`systemlist` was introduced in a patch for Vim 7.4. By instead using `split(system(...), '\n')`, the plugin should be compatible with Vim 7.3 (and perhaps also earlier versions).
This commit is contained in:
parent
66c0b273e2
commit
bc50385973
@ -408,7 +408,7 @@ function! s:xwin_get_id() dict " {{{1
|
|||||||
sleep 500m
|
sleep 500m
|
||||||
|
|
||||||
let cmd = 'xdotool search --class ' . self.class
|
let cmd = 'xdotool search --class ' . self.class
|
||||||
let xwin_ids = systemlist(cmd)
|
let xwin_ids = split(system(cmd), '\n')
|
||||||
if len(xwin_ids) == 0
|
if len(xwin_ids) == 0
|
||||||
call vimtex#echo#warning(
|
call vimtex#echo#warning(
|
||||||
\ 'vimtex viewer can not find ' . self.class . ' window ID!')
|
\ 'vimtex viewer can not find ' . self.class . ' window ID!')
|
||||||
@ -425,7 +425,7 @@ function! s:xwin_exists() dict " {{{1
|
|||||||
if !executable('xdotool') | return 0 | endif
|
if !executable('xdotool') | return 0 | endif
|
||||||
|
|
||||||
let cmd = 'xdotool search --class ' . self.class
|
let cmd = 'xdotool search --class ' . self.class
|
||||||
if index(systemlist(cmd), self.xwin_id) >= 0
|
if index(split(system(cmd), '\n'), self.xwin_id) >= 0
|
||||||
return 1
|
return 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user