From 3871cb78bc727e61c45c4f256e3f575fbce3724a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 14 Feb 2010 12:23:25 +0000 Subject: [PATCH] autocompete was matching import_foo as import keyword. breaking autocomp. on import_scene_obj for eg. --- release/scripts/modules/console/intellisense.py | 2 +- release/scripts/op/console_python.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/release/scripts/modules/console/intellisense.py b/release/scripts/modules/console/intellisense.py index 96896d5fd0e..0f9acf9b6a9 100644 --- a/release/scripts/modules/console/intellisense.py +++ b/release/scripts/modules/console/intellisense.py @@ -30,7 +30,7 @@ import re # regular expressions to find out which completer we need # line which starts with an import statement -RE_MODULE = re.compile('^import|from.+') +RE_MODULE = re.compile('^import(\s|$)|from.+') # The following regular expression means an 'unquoted' word RE_UNQUOTED_WORD = re.compile( diff --git a/release/scripts/op/console_python.py b/release/scripts/op/console_python.py index dab4899b3e6..15462841999 100644 --- a/release/scripts/op/console_python.py +++ b/release/scripts/op/console_python.py @@ -162,7 +162,7 @@ def autocomplete(context): line=current_line.line, cursor=current_line.current_character, namespace=console.locals, - private='-d' in sys.argv) + private=bpy.app.debug) # Now we need to copy back the line from blender back into the # text editor. This will change when we dont use the text editor