patch [#34380] Fix Python console bug: "autocomplete" doesn't advance cursor properly when completion includes UTF8 characters

from Shinsuke Irie (irie)
This commit is contained in:
Campbell Barton 2013-02-24 21:51:48 +00:00
parent a9b9fcc951
commit 83e53afb18

View File

@ -148,7 +148,7 @@ def expand(line, cursor, namespace, private=True):
if prefix:
line = line[:cursor] + prefix + line[cursor:]
cursor += len(prefix)
cursor += len(prefix.encode('utf-8'))
if no_calltip and prefix.endswith('('):
return expand(line, cursor, namespace, private)
return line, cursor, scrollback