From 6f87e27d4e20ea8b71821df06f71818716a13cf3 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Sun, 11 Jun 2017 15:17:11 +0900 Subject: [PATCH] Fix deoplete source --- rplugin/python3/deoplete/sources/neosnippet.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rplugin/python3/deoplete/sources/neosnippet.py b/rplugin/python3/deoplete/sources/neosnippet.py index 0b6b278..3250d0c 100644 --- a/rplugin/python3/deoplete/sources/neosnippet.py +++ b/rplugin/python3/deoplete/sources/neosnippet.py @@ -43,6 +43,9 @@ class Source(Base): candidate['menu'] = candidate['menu_abbr'] def gather_candidates(self, context): + candidates = self.__cache.get(context['filetype'], []) if context['filetype'] not in self.__cache: self.on_event(context) - return self.__cache.get(context['filetype'], []) + if not re.match(r'\w\+$', context['complete_str']): + candidates = [x for x in candidates if x['options']['word']] + return candidates