From b17544551fc8dfd1304d5679c6e444cad4d34d97 Mon Sep 17 00:00:00 2001 From: "Kurt B. Kaiser" Date: Fri, 18 Nov 2005 22:05:48 +0000 Subject: 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 --- Lib/idlelib/PyShell.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Lib/idlelib/PyShell.py') diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index 5034417029..f81091bc4b 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 -- cgit v1.2.1