summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2020-10-17 16:36:13 +0900
committerShougo Matsushita <Shougo.Matsu@gmail.com>2020-10-17 16:36:13 +0900
commit8987c95cb746b23e5d2c22d43eb1f14ade1404eb (patch)
tree506b8d4a7f5917e51596f0c212c985a6358350e4
parent8d208ee0c4e9697b8482f35494e557cd5955e6f5 (diff)
downloaddeoplete.nvim-8987c95cb746b23e5d2c22d43eb1f14ade1404eb.zip
Fix #1137 needs_poll update problem
-rw-r--r--rplugin/python3/deoplete/deoplete.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/rplugin/python3/deoplete/deoplete.py b/rplugin/python3/deoplete/deoplete.py
index e0c032c..c5a08cf 100644
--- a/rplugin/python3/deoplete/deoplete.py
+++ b/rplugin/python3/deoplete/deoplete.py
@@ -97,11 +97,13 @@ class Deoplete(logger.LoggingMixin):
self._vim.call('deoplete#handler#_async_timer_start')
# Async update is skipped if same.
+ # Note: If needs_poll, it cannot be skipped.
prev_completion = self._vim.vars['deoplete#_prev_completion']
prev_candidates = prev_completion['candidates']
event = context['event']
- if (event == 'Async' or event == 'Update' and
- prev_candidates and candidates == prev_candidates):
+ same_candidates = prev_candidates and candidates == prev_candidates
+ if not needs_poll and same_candidates and (
+ event == 'Async' or event == 'Update'):
return
# error(self._vim, candidates)