encode output strings to latin-1, vim has problems with utf8. fixes #48

This commit is contained in:
David Halter
2012-12-18 16:14:21 +01:00
parent 42900bb62f
commit 72571db6ee
2 changed files with 6 additions and 1 deletions

2
jedi

Submodule jedi updated: 2d75f509b7...df95416160

View File

@@ -21,6 +21,11 @@ class PythonToVimStr(encoding):
""" Vim has a different string implementation of single quotes """
__slots__ = []
def __new__(cls, s):
# VIM doesn't like UTF-8
s = s.decode('latin-1')
return super(PythonToVimStr, cls).__new__(cls, s)
def __repr__(self):
# this is totally stupid and makes no sense but vim/python unicode
# support is pretty bad. don't ask how I came up with this... It just