From 9dd41b92f50159e5180c3f43380fb36a190cb0a6 Mon Sep 17 00:00:00 2001 From: Stanislav Seletskiy Date: Fri, 20 Jan 2017 13:31:10 +0700 Subject: [PATCH] address issue #691: try to fix non-utf encoding --- pythonx/UltiSnips/snippet_manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pythonx/UltiSnips/snippet_manager.py b/pythonx/UltiSnips/snippet_manager.py index fad3ece..c11785f 100644 --- a/pythonx/UltiSnips/snippet_manager.py +++ b/pythonx/UltiSnips/snippet_manager.py @@ -839,7 +839,8 @@ class SnippetManager(object): try: if inserted_char == '': before = _vim.buf.line_till_cursor - if before and before[-1] == self._last_change[0] or \ + if before and \ + before[-1].encode('ascii') == self._last_change[0] or \ self._last_change[1] != vim.current.window.cursor[0]: self._try_expand(autotrigger_only=True)