From 8ef4a70a48daa451fca6d59a6129f49389e5b0fe Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Sun, 15 Jan 2012 19:02:50 -0500 Subject: [PATCH] #13039 allow proper deletion of '>>> ' in IDLE editor windows. Patch by Roger Serwy. --- Lib/idlelib/EditorWindow.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index f16badb90e..1230047ed2 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -1135,7 +1135,10 @@ class EditorWindow(object): assert have > 0 want = ((have - 1) // self.indentwidth) * self.indentwidth # Debug prompt is multilined.... - last_line_of_prompt = sys.ps1.split('\n')[-1] + if self.context_use_ps1: + last_line_of_prompt = sys.ps1.split('\n')[-1] + else: + last_line_of_prompt = '' ncharsdeleted = 0 while 1: if chars == last_line_of_prompt: -- 2.50.1