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:
parent
a9b9fcc951
commit
83e53afb18
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user