Merge pull request #276 from JazzCore/ultisnips_unicode

fix UnicodeEncodeError in ultisnips_completer
This commit is contained in:
Val Markovic 2013-04-25 15:17:36 -07:00
commit dd8ca0cce2

View File

@ -62,7 +62,7 @@ def _GetCandidates():
# class.trigger - name of snippet trigger word ( e.g. defn or testcase ) # class.trigger - name of snippet trigger word ( e.g. defn or testcase )
# class.description - description of the snippet # class.description - description of the snippet
return [ { 'word': str( snip.trigger ), return [ { 'word': str( snip.trigger ),
'menu': str( '<snip> ' + snip.description ) } 'menu': str( '<snip> ' + snip.description.encode('utf-8') ) }
for snip in rawsnips ] for snip in rawsnips ]
except: except:
return [] return []