diff options
-rw-r--r-- | autoload/ale/util.vim | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/autoload/ale/util.vim b/autoload/ale/util.vim index 99cd856a..8d166625 100644 --- a/autoload/ale/util.vim +++ b/autoload/ale/util.vim @@ -336,15 +336,11 @@ function! ale#util#GetMatches(lines, patterns) abort endfunction function! s:LoadArgCount(function) abort - let l:Function = a:function - - redir => l:output - silent! function Function - redir END - - if !exists('l:output') + try + let l:output = execute('function a:function') + catch /E123/ return 0 - endif + endtry let l:match = matchstr(split(l:output, "\n")[0], '\v\([^)]+\)')[1:-2] let l:arg_list = filter(split(l:match, ', '), 'v:val isnot# ''...''') |