disable auto indent when pasting text into the python console.

This commit is contained in:
2013-05-24 01:04:37 +00:00
parent ebe86abb46
commit 8e6ce736c4
3 changed files with 20 additions and 9 deletions

View File

@@ -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 = ""