#691, #812: fix unicode compat with py3

This commit is contained in:
Stanislav Seletskiy 2017-01-20 16:26:28 +07:00
parent 69574e7760
commit 7f7058d8ce

View File

@ -836,8 +836,13 @@ class SnippetManager(object):
self._should_update_textobjects = True
inserted_char = _vim.as_unicode(_vim.eval('v:char'))
if not isinstance(inserted_char, unicode):
return
if sys.version_info >= (3, 0):
if isinstance(inserted_char, bytes):
return
else:
if not isinstance(inserted_char, unicode):
return
try:
if inserted_char == '':