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
expelledboy - Anthony Jackson
allait - Alexey Bezhan
peacech - Charles Gunawan
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
want to use, and return it.
"""
display = repr(
[ "%i: %s" % (i+1,s.description) for i,s in
enumerate(snippets)
]
)
# make a python list
display = [ "%i: %s" % (i+1,s.description) for i,s in enumerate(snippets)]
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':
return None
rv = int(rv)