#159 Change the condition for checking for Vim 8 features to work better in MacVim 7.

This commit is contained in:
w0rp 2016-11-04 10:17:49 +00:00
parent f9cbc69ce1
commit ca18a80e3e
1 changed files with 5 additions and 3 deletions

View File

@ -12,12 +12,14 @@ let g:loaded_ale = 1
" A flag for detecting if the required features are set.
if has('nvim')
let s:ale_has_required_features = has('timers')
let s:has_features = has('timers')
else
let s:ale_has_required_features = has('timers') && has('job') && has('channel')
" Check if Job and Channel functions are available, instead of the
" features. This works better on old MacVim versions.
let s:has_features = has('timers') && exists('*job_start') && exists('*ch_close_in')
endif
if !s:ale_has_required_features
if !s:has_features
echoerr 'ALE requires NeoVim >= 0.1.5 or Vim 8 with +timers +job +channel'
echoerr 'Please update your editor appropriately.'
finish