summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoload/deoplete/handler.vim2
-rw-r--r--rplugin/python3/deoplete/deoplete.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/autoload/deoplete/handler.vim b/autoload/deoplete/handler.vim
index 9b7acf5..5855662 100644
--- a/autoload/deoplete/handler.vim
+++ b/autoload/deoplete/handler.vim
@@ -186,7 +186,7 @@ function! deoplete#handler#_completion_begin(event) abort
call s:check_prev_completion(a:event)
- if a:event !=# 'Update'
+ if a:event !=# 'Update' && a:event !=# 'Async'
call deoplete#init#_prev_completion()
endif
diff --git a/rplugin/python3/deoplete/deoplete.py b/rplugin/python3/deoplete/deoplete.py
index bc36a12..a33806c 100644
--- a/rplugin/python3/deoplete/deoplete.py
+++ b/rplugin/python3/deoplete/deoplete.py
@@ -102,8 +102,8 @@ class Deoplete(logger.LoggingMixin):
# Async update is skipped if same.
prev_completion = self._vim.vars['deoplete#_prev_completion']
prev_candidates = prev_completion['candidates']
- if (context['event'] == 'Async' and
- context['event'] == prev_completion['event'] and
+ event = context['event']
+ if (event == 'Async' or event == 'Update' and
prev_candidates and len(candidates) <= len(prev_candidates)):
return