Fixed bug 411010
This commit is contained in:
parent
43e60ebd57
commit
f4515daeee
@ -476,13 +476,18 @@ class SnippetManager(object):
|
||||
]
|
||||
)
|
||||
|
||||
rv = vim.eval("inputlist(%s)" % display)
|
||||
if rv is None or rv == '0':
|
||||
return True
|
||||
rv = int(rv)
|
||||
if rv > len(snippets):
|
||||
rv = len(snippets)
|
||||
snippet = snippets[rv-1]
|
||||
try:
|
||||
rv = vim.eval("inputlist(%s)" % display)
|
||||
if rv is None or rv == '0':
|
||||
return True
|
||||
rv = int(rv)
|
||||
if rv > len(snippets):
|
||||
rv = len(snippets)
|
||||
snippet = snippets[rv-1]
|
||||
except vim.error, e:
|
||||
if str(e) == 'invalid expression':
|
||||
return True
|
||||
raise
|
||||
|
||||
self._expect_move_wo_change = True
|
||||
|
||||
|
35
test.py
35
test.py
@ -1096,6 +1096,41 @@ class Multiple_SimpleCaseSelectZero_EEscape(_MultipleMatches):
|
||||
class Multiple_SimpleCaseEscapeOut_ECR(_MultipleMatches):
|
||||
keys = "test" + EX + ESC + "hi"
|
||||
wanted = "testhi"
|
||||
class Multiple_ManySnippetsOneTrigger_ECR(_VimTest):
|
||||
# Snippet definition {{{
|
||||
snippets = (
|
||||
("test", "Case1", "This is Case 1"),
|
||||
("test", "Case2", "This is Case 2"),
|
||||
("test", "Case3", "This is Case 3"),
|
||||
("test", "Case4", "This is Case 4"),
|
||||
("test", "Case5", "This is Case 5"),
|
||||
("test", "Case6", "This is Case 6"),
|
||||
("test", "Case7", "This is Case 7"),
|
||||
("test", "Case8", "This is Case 8"),
|
||||
("test", "Case9", "This is Case 9"),
|
||||
("test", "Case10", "This is Case 10"),
|
||||
("test", "Case11", "This is Case 11"),
|
||||
("test", "Case12", "This is Case 12"),
|
||||
("test", "Case13", "This is Case 13"),
|
||||
("test", "Case14", "This is Case 14"),
|
||||
("test", "Case15", "This is Case 15"),
|
||||
("test", "Case16", "This is Case 16"),
|
||||
("test", "Case17", "This is Case 17"),
|
||||
("test", "Case18", "This is Case 18"),
|
||||
("test", "Case19", "This is Case 19"),
|
||||
("test", "Case20", "This is Case 20"),
|
||||
("test", "Case21", "This is Case 21"),
|
||||
("test", "Case22", "This is Case 22"),
|
||||
("test", "Case23", "This is Case 23"),
|
||||
("test", "Case24", "This is Case 24"),
|
||||
("test", "Case25", "This is Case 25"),
|
||||
("test", "Case26", "This is Case 26"),
|
||||
("test", "Case27", "This is Case 27"),
|
||||
("test", "Case28", "This is Case 28"),
|
||||
("test", "Case29", "This is Case 29"),
|
||||
) # }}}
|
||||
keys = "test" + EX + ESC + ESC + "ahi"
|
||||
wanted = "testhi"
|
||||
|
||||
###########################################################################
|
||||
# END OF TEST #
|
||||
|
Loading…
Reference in New Issue
Block a user