Regression fix for listing snippets by Charles Gunawan

This commit is contained in:
Holger Rapp 2011-06-28 22:22:41 +02:00
parent cc68d27d93
commit c6af0d0c72
2 changed files with 5 additions and 6 deletions

View File

@ -748,6 +748,7 @@ Contributers are listed in chronological order:
blueyed - Daniel Hahler blueyed - Daniel Hahler
expelledboy - Anthony Jackson expelledboy - Anthony Jackson
allait - Alexey Bezhan allait - Alexey Bezhan
peacech - Charles Gunawan
7.2 Snippets *UltiSnips-contrisnippets* 7.2 Snippets *UltiSnips-contrisnippets*
------------ ------------

View File

@ -961,14 +961,12 @@ class SnippetManager(object):
""" Given a list of snippets, ask the user which one they """ Given a list of snippets, ask the user which one they
want to use, and return it. want to use, and return it.
""" """
display = repr( # make a python list
[ "%i: %s" % (i+1,s.description) for i,s in display = [ "%i: %s" % (i+1,s.description) for i,s in enumerate(snippets)]
enumerate(snippets)
]
)
try: try:
rv = vim.eval("inputlist([%s])" % vim_string(display)) # let vim_string format it as a vim list
rv = vim.eval("inputlist(%s)" % vim_string(display))
if rv is None or rv == '0': if rv is None or rv == '0':
return None return None
rv = int(rv) rv = int(rv)