summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/PyShell.py
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2005-11-18 22:05:48 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2005-11-18 22:05:48 (GMT)
commitb17544551fc8dfd1304d5679c6e444cad4d34d97 (patch)
tree75cb5f0b7551a755354fc8fff5ae65449a3442ba /Lib/idlelib/PyShell.py
parentc85c74cd08f619b69a61a0290c660d642a15e9d3 (diff)
downloadcpython-b17544551fc8dfd1304d5679c6e444cad4d34d97.zip
cpython-b17544551fc8dfd1304d5679c6e444cad4d34d97.tar.gz
cpython-b17544551fc8dfd1304d5679c6e444cad4d34d97.tar.bz2
Merge IDLE-syntax-branch r39668:41449 into trunk
A idlelib/AutoCompleteWindow.py A idlelib/AutoComplete.py A idlelib/HyperParser.py M idlelib/PyShell.py M idlelib/ParenMatch.py M idlelib/configDialog.py M idlelib/EditorWindow.py M idlelib/PyParse.py M idlelib/CallTips.py M idlelib/CallTipWindow.py M idlelib/run.py M idlelib/config-extensions.def A idlelib/MultiCall.py
Diffstat (limited to 'Lib/idlelib/PyShell.py')
-rw-r--r--Lib/idlelib/PyShell.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index 5034417..f81091b 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -1091,11 +1091,12 @@ class PyShell(OutputWindow):
self.recall(self.text.get(next[0], next[1]), event)
return "break"
# No stdin mark -- just get the current line, less any prompt
- line = self.text.get("insert linestart", "insert lineend")
- last_line_of_prompt = sys.ps1.split('\n')[-1]
- if line.startswith(last_line_of_prompt):
- line = line[len(last_line_of_prompt):]
- self.recall(line, event)
+ indices = self.text.tag_nextrange("console", "insert linestart")
+ if indices and \
+ self.text.compare(indices[0], "<=", "insert linestart"):
+ self.recall(self.text.get(indices[1], "insert lineend"), event)
+ else:
+ self.recall(self.text.get("insert linestart", "insert lineend"), event)
return "break"
# If we're between the beginning of the line and the iomark, i.e.
# in the prompt area, move to the end of the prompt