Fix bug: List snippets didn't work after whitespace.
This commit is contained in:
parent
46f3258af9
commit
8dd7720c29
@ -334,6 +334,7 @@ class Snippet(object):
|
||||
self._matched = ""
|
||||
|
||||
# Don't expand on whitespace
|
||||
trigger = trigger.lstrip()
|
||||
if trigger and trigger.rstrip() is not trigger:
|
||||
return False
|
||||
|
||||
|
3
test.py
3
test.py
@ -1808,6 +1808,9 @@ class _ListAllSnippets(_VimTest):
|
||||
class ListAllAvailable_NothingTyped_ExceptCorrectResult(_ListAllSnippets):
|
||||
keys = "" + LS + "3\n"
|
||||
wanted = "BLAAH"
|
||||
class ListAllAvailable_SpaceInFront_ExceptCorrectResult(_ListAllSnippets):
|
||||
keys = " " + LS + "3\n"
|
||||
wanted = " BLAAH"
|
||||
class ListAllAvailable_testtyped_ExceptCorrectResult(_ListAllSnippets):
|
||||
keys = "hallo test" + LS + "2\n"
|
||||
wanted = "hallo BLAAH"
|
||||
|
Loading…
x
Reference in New Issue
Block a user