mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-06 10:54:22 +08:00
encode output strings to latin-1, vim has problems with utf8. fixes #48
This commit is contained in:
2
jedi
2
jedi
Submodule jedi updated: 2d75f509b7...df95416160
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user