diff options
author | w0rp <devw0rp@gmail.com> | 2019-05-12 19:35:10 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2019-05-12 19:35:10 +0100 |
commit | bfc79bd2aafffc9b8590f9ffa68254243e3f808a (patch) | |
tree | 61b01402125c60ea9ffdfebb67795e0809f736f1 /rplugin/python3 | |
parent | 7943bfab96ea1ecc169e815f75062cc127192ed8 (diff) | |
download | ale-bfc79bd2aafffc9b8590f9ffa68254243e3f808a.zip |
#2492 - Try to fix a deoplete bug again
Diffstat (limited to 'rplugin/python3')
-rw-r--r-- | rplugin/python3/deoplete/sources/ale.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/rplugin/python3/deoplete/sources/ale.py b/rplugin/python3/deoplete/sources/ale.py index 55121d76..7ed2f6c0 100644 --- a/rplugin/python3/deoplete/sources/ale.py +++ b/rplugin/python3/deoplete/sources/ale.py @@ -30,6 +30,10 @@ class Source(Base): return self.vim.call('ale#completion#GetCompletionPosition') def gather_candidates(self, context): + # Stop early if ALE can't provide completion data for this buffer. + if not self.vim.call('ale#completion#CanProvideCompletions'): + return None + if context.get('is_refresh'): context['is_async'] = False @@ -47,4 +51,4 @@ class Source(Base): # Request some completion results. self.vim.call('ale#completion#GetCompletions', 'deoplete') - return None + return [] |