diff options
author | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2020-11-10 09:42:49 +0900 |
---|---|---|
committer | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2020-11-10 09:42:49 +0900 |
commit | 84b30e9367a1708990955bf4ae0d1e9650bc5616 (patch) | |
tree | c2bb02b224bf00a4247aec0fa5c7beac406f16c0 /rplugin | |
parent | 501b7162ab9e81bf1691cc5561eb98afde36d729 (diff) | |
download | deoplete.nvim-84b30e9367a1708990955bf4ae0d1e9650bc5616.zip |
Fix multi process flicker problem
Diffstat (limited to 'rplugin')
-rw-r--r-- | rplugin/python3/deoplete/deoplete.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/rplugin/python3/deoplete/deoplete.py b/rplugin/python3/deoplete/deoplete.py index cd68f06..f09dbae 100644 --- a/rplugin/python3/deoplete/deoplete.py +++ b/rplugin/python3/deoplete/deoplete.py @@ -164,11 +164,15 @@ class Deoplete(logger.LoggingMixin): def _merge_results(self, context: UserContext) -> typing.Tuple[ bool, bool, int, typing.List[typing.Any]]: + # If parallel feature is enabled, it is updated frequently. + # But if it is single process, it cannot be updated. + # So it must be updated. + async_check = len(self._parents) > 1 or ( + context['event'] != 'Async' and context['event'] != 'Update') use_prev = (context['input'] == self._prev_input and context['next_input'] == self._prev_next_input and context['event'] != 'Manual' - and context['event'] != 'Async' - and context['event'] != 'Update') + and async_check) if not use_prev: self._prev_results = {} |