syntastic git · master
syntastic vim plugin (fork)
Vim Script 99%git clone https://git.christianimmanuel.de/mirrors-forks/syntastic.gitwget https://git.christianimmanuel.de/mirrors-forks/syntastic/archive/syntastic.tar.gzSanity check: syntastic can't run in rvim.
autoload/syntastic/util.vim | 5 +++++ plugin/syntastic.vim | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/autoload/syntastic/util.vim b/autoload/syntastic/util.vim index 8a17fe64..41b40e6a 100644 --- a/autoload/syntastic/util.vim +++ b/autoload/syntastic/util.vim @@ -42,6 +42,11 @@ function! syntastic#util#system(command) abort " {{{2 try let out = system(a:command) catch + if v:exception =~# '\m^Vim\%((\a\+)\)\=:\%(E145\|E484\|E684\)' + " XXX re-throwing unmodified v:exception triggers E608 + throw substitute(v:exception, '.*:\(E145\|E484\|E684\).*', '\1', '') + endif + let crashed = 1 call syntastic#log#error('exception running system(' . string(a:command) . '): ' . v:exception) if syntastic#util#isRunningWindows() diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index d48a8d12..4a113eee 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -19,7 +19,7 @@ if has('reltime') lockvar! g:_SYNTASTIC_START endif -let g:_SYNTASTIC_VERSION = '3.10.0-4' +let g:_SYNTASTIC_VERSION = '3.10.0-5' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1 @@ -57,10 +57,13 @@ if s:_running_windows elseif executable('uname') try let g:_SYNTASTIC_UNAME = split(syntastic#util#system('uname'), "\n")[0] - catch /\m^Vim\%((\a\+)\)\=:E484/ + catch /\m^E145$/ + call syntastic#log#error("can't run in rvim") + finish + catch /\m^E484$/ call syntastic#log#error("can't run external programs (misconfigured shell options?)") finish - catch /\m^Vim\%((\a\+)\)\=:E684/ + catch /\m^E684$/ let g:_SYNTASTIC_UNAME = 'Unknown' endtry else