diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-05-24 05:04:37 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-05-24 05:04:37 +0400 |
commit | 8e6ce736c4fcdd83344b0b6e0ba65cec340eec21 (patch) | |
tree | 6195e1169791ee9718d78e9a9716dd3e257a9f25 /release/scripts/modules/console_python.py | |
parent | ebe86abb462a8b38e467d70ca88d58ad15f07336 (diff) |
disable auto indent when pasting text into the python console.
Diffstat (limited to 'release/scripts/modules/console_python.py')
-rw-r--r-- | release/scripts/modules/console_python.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/release/scripts/modules/console_python.py b/release/scripts/modules/console_python.py index 54782aa9419..66956899076 100644 --- a/release/scripts/modules/console_python.py +++ b/release/scripts/modules/console_python.py @@ -126,7 +126,7 @@ PROMPT = '>>> ' PROMPT_MULTI = '... ' -def execute(context): +def execute(context, is_interactive): sc = context.space_data try: @@ -190,9 +190,12 @@ def execute(context): if is_multiline: sc.prompt = PROMPT_MULTI - indent = line[:len(line) - len(line.lstrip())] - if line.rstrip().endswith(":"): - indent += " " + if is_interactive: + indent = line[:len(line) - len(line.lstrip())] + if line.rstrip().endswith(":"): + indent += " " + else: + indent = "" else: sc.prompt = PROMPT indent = "" |