From bfc79bd2aafffc9b8590f9ffa68254243e3f808a Mon Sep 17 00:00:00 2001 From: w0rp Date: Sun, 12 May 2019 19:35:10 +0100 Subject: #2492 - Try to fix a deoplete bug again --- rplugin/python3/deoplete/sources/ale.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'rplugin/python3') 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 [] -- cgit v1.2.3