Anonymous triggers with empty trigger string where not expanded after whitespaces.

This commit is contained in:
Holger Rapp 2011-07-26 16:21:39 +02:00
parent b774ce8f11
commit 72ed530746
2 changed files with 6 additions and 1 deletions

View File

@ -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:

View File

@ -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"