diff --git a/plugin/UltiSnips/__init__.py b/plugin/UltiSnips/__init__.py index 66e5e3d..68f8a86 100644 --- a/plugin/UltiSnips/__init__.py +++ b/plugin/UltiSnips/__init__.py @@ -719,7 +719,7 @@ class SnippetManager(object): before, after = self._get_before_after() snip = Snippet(trigger, value, descr, options, globals) - if snip.matches(before): + if not trigger or snip.matches(before): self._do_snippet(snip, before, after) return True else: diff --git a/test.py b/test.py index 803d3a8..84df059 100755 --- a/test.py +++ b/test.py @@ -2008,6 +2008,11 @@ class Anon_NoTrigger_Simple(_AnonBase): keys = "abc" + EA wanted = "abcsimple expand" +class Anon_NoTrigger_AfterSpace(_AnonBase): + args = '"simple expand"' + keys = "abc " + EA + wanted = "abc simple expand" + class Anon_NoTrigger_Multi(_AnonBase): args = '"simple $1 expand $1 $0"' keys = "abc" + EA + "123" + JF + "456"