summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2016-11-04 10:17:49 +0000
committerw0rp <devw0rp@gmail.com>2016-11-04 10:17:49 +0000
commitca18a80e3e6931d9a0aec32e1289a2019eda14c2 (patch)
tree9c86812969e4f1e781081c547e734d64aae030bf /plugin
parentf9cbc69ce1368ffde415a51bd59a1b271d269748 (diff)
downloadale-ca18a80e3e6931d9a0aec32e1289a2019eda14c2.zip
#159 Change the condition for checking for Vim 8 features to work better in MacVim 7.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/ale.vim8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugin/ale.vim b/plugin/ale.vim
index 0ed1360f..9d2f62c1 100644
--- a/plugin/ale.vim
+++ b/plugin/ale.vim
@@ -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