diff options
author | w0rp <devw0rp@gmail.com> | 2017-05-19 09:49:00 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-05-20 19:02:36 +0100 |
commit | 4214832ae263086d1aa1f565067d00e9ed1b820e (patch) | |
tree | 4378db3624fc4a6e71460fbf1d394107da73b358 /autoload | |
parent | 1f4d1800e0040d7d36d1c19e15c5f0e570122273 (diff) | |
download | ale-4214832ae263086d1aa1f565067d00e9ed1b820e.zip |
Remove the code for checking if functions exist. It breaks autoload functions
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/fix.vim | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/autoload/ale/fix.vim b/autoload/ale/fix.vim index 89778a16..b2ca2575 100644 --- a/autoload/ale/fix.vim +++ b/autoload/ale/fix.vim @@ -241,29 +241,19 @@ function! s:GetCallbacks() abort return [] endif - let l:problem_list = [] let l:corrected_list = [] for l:item in l:callback_list if type(l:item) == type('') - if exists('*' . l:item) - call add(l:corrected_list, function(l:item)) - else - let l:func = ale#fix#registry#GetFunc(l:item) + let l:func = ale#fix#registry#GetFunc(l:item) - if !empty(l:func) && exists('*' . l:func) - call add(l:corrected_list, function(l:func)) - else - call add(l:problem_list, l:item) - endif + if !empty(l:func) + let l:item = l:func endif endif - endfor - if !empty(l:problem_list) - echoerr 'Invalid fixers used: ' . string(l:problem_list) - return [] - endif + call add(l:corrected_list, function(l:item)) + endfor return l:corrected_list endfunction |