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:
@@ -148,7 +148,7 @@ def expand(line, cursor, namespace, private=True):
|
|||||||
|
|
||||||
if prefix:
|
if prefix:
|
||||||
line = line[:cursor] + prefix + line[cursor:]
|
line = line[:cursor] + prefix + line[cursor:]
|
||||||
cursor += len(prefix)
|
cursor += len(prefix.encode('utf-8'))
|
||||||
if no_calltip and prefix.endswith('('):
|
if no_calltip and prefix.endswith('('):
|
||||||
return expand(line, cursor, namespace, private)
|
return expand(line, cursor, namespace, private)
|
||||||
return line, cursor, scrollback
|
return line, cursor, scrollback
|
||||||
|
Reference in New Issue
Block a user