diff options
author | w0rp <devw0rp@gmail.com> | 2017-07-17 17:39:11 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-07-17 17:39:11 +0100 |
commit | a6cc492a996476f55a93c12d34c0547e5d9dd37f (patch) | |
tree | c04a1ae5c16b42f356a6da6085ba0309689e690d | |
parent | 27feab7e3ad47f1c50f841b9377f01a31ee09678 (diff) | |
download | ale-a6cc492a996476f55a93c12d34c0547e5d9dd37f.zip |
Limit the suggestions only after filtering them
-rw-r--r-- | autoload/ale/completion.vim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/autoload/ale/completion.vim b/autoload/ale/completion.vim index 937b64c7..0ad0f6a5 100644 --- a/autoload/ale/completion.vim +++ b/autoload/ale/completion.vim @@ -91,7 +91,7 @@ function! ale#completion#OmniFunc(findstart, base) abort let b:ale_completion_result = ale#completion#FilterSuggestionsByPrefix( \ function(l:parser)(l:response), \ l:prefix - \) + \)[: g:ale_completion_max_suggestions] endif return get(b:, 'ale_completion_result', []) @@ -132,7 +132,7 @@ endfunction function! ale#completion#ParseTSServerCompletions(response) abort let l:names = [] - for l:suggestion in a:response.body[: g:ale_completion_max_suggestions] + for l:suggestion in a:response.body call add(l:names, l:suggestion.name) endfor |