From 83e53afb18b0bae4cfc21dcabc14a5720494af0e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 24 Feb 2013 21:51:48 +0000 Subject: [PATCH] patch [#34380] Fix Python console bug: "autocomplete" doesn't advance cursor properly when completion includes UTF8 characters from Shinsuke Irie (irie) --- release/scripts/modules/console/intellisense.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/scripts/modules/console/intellisense.py b/release/scripts/modules/console/intellisense.py index a177b305fda..b694cceafea 100644 --- a/release/scripts/modules/console/intellisense.py +++ b/release/scripts/modules/console/intellisense.py @@ -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