From: Terry Jan Reedy Date: Mon, 16 Jan 2012 00:03:23 +0000 (-0500) Subject: #13039 allow proper deletion of '>>> ' in IDLE editor windows. X-Git-Tag: v3.2.3rc1~178 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7f53aea53b4b1d0da69d004e57715d3943797b26;p=thirdparty%2FPython%2Fcpython.git #13039 allow proper deletion of '>>> ' in IDLE editor windows. Patch by Roger Serwy. --- diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index 203a19559362..f47a9c134853 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -1134,7 +1134,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: