From 4896d55b1dcf3cef3aa15ec5c4ae716c3f9b8e59 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Thu, 15 Jun 2017 09:01:23 +0900 Subject: [PATCH] Fix neosnippet source --- rplugin/python3/deoplete/sources/neosnippet.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rplugin/python3/deoplete/sources/neosnippet.py b/rplugin/python3/deoplete/sources/neosnippet.py index 3250d0c..37b0cfa 100644 --- a/rplugin/python3/deoplete/sources/neosnippet.py +++ b/rplugin/python3/deoplete/sources/neosnippet.py @@ -46,6 +46,8 @@ class Source(Base): candidates = self.__cache.get(context['filetype'], []) if context['filetype'] not in self.__cache: self.on_event(context) - if not re.match(r'\w\+$', context['complete_str']): + m1 = re.match(r'\w+$', context['complete_str']) + m2 = re.match(r'\S+$', context['complete_str']) + if m1 and m2 and m1.group(0) != m2.group(0): candidates = [x for x in candidates if x['options']['word']] return candidates