[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37358] trunk/blender/release/scripts/ modules/console/intellisense.py: fix [#27495] Incorrect result of image name autocompletion

Campbell Barton ideasman42 at gmail.com
Fri Jun 10 09:22:36 CEST 2011


Revision: 37358
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37358
Author:   campbellbarton
Date:     2011-06-10 07:22:35 +0000 (Fri, 10 Jun 2011)
Log Message:
-----------
fix [#27495] Incorrect result of image name autocompletion

Modified Paths:
--------------
    trunk/blender/release/scripts/modules/console/intellisense.py

Modified: trunk/blender/release/scripts/modules/console/intellisense.py
===================================================================
--- trunk/blender/release/scripts/modules/console/intellisense.py	2011-06-10 05:10:17 UTC (rev 37357)
+++ trunk/blender/release/scripts/modules/console/intellisense.py	2011-06-10 07:22:35 UTC (rev 37358)
@@ -126,7 +126,14 @@
         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:




More information about the Bf-blender-cvs mailing list