From bc50385973251b4488e5cfb30e12ad7fdcafe992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Mon, 6 Jul 2015 15:31:09 +0200 Subject: [PATCH] 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). --- autoload/vimtex/view.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/vimtex/view.vim b/autoload/vimtex/view.vim index 78c9d58..dec3fba 100644 --- a/autoload/vimtex/view.vim +++ b/autoload/vimtex/view.vim @@ -408,7 +408,7 @@ function! s:xwin_get_id() dict " {{{1 sleep 500m let cmd = 'xdotool search --class ' . self.class - let xwin_ids = systemlist(cmd) + let xwin_ids = split(system(cmd), '\n') if len(xwin_ids) == 0 call vimtex#echo#warning( \ '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 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 endif