fix UnicodeEncodeError in ultisnips_completer
Fix a rare exception when a description of UltiSnips snippet contains unicode symbols. Fixes #274
This commit is contained in:
parent
a9215f10fe
commit
4d138b2b7f
@ -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 []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user