From 1f56eee95304e38b91e05cbb2e595948585b2f31 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 10 Jun 2011 07:22:35 +0000 Subject: [PATCH] fix [#27495] Incorrect result of image name autocompletion --- release/scripts/modules/console/intellisense.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/release/scripts/modules/console/intellisense.py b/release/scripts/modules/console/intellisense.py index 9352d7c14e1..00f7dbd3657 100644 --- a/release/scripts/modules/console/intellisense.py +++ b/release/scripts/modules/console/intellisense.py @@ -126,7 +126,14 @@ def expand(line, cursor, namespace, private=True): if len(matches) == 1: scrollback = '' else: - scrollback = ' '.join([m.split('.')[-1] for m in matches]) + # causes blender bug [#27495] since string keys may contain '.' + # scrollback = ' '.join([m.split('.')[-1] for m in matches]) + scrollback = ' '.join( + [m[len(word):] + if (word and m.startswith(word)) + else m.split('.')[-1] + for m in matches]) + no_calltip = True prefix = os.path.commonprefix(matches)[len(word):] if prefix: