]> granicus.if.org Git - python/commitdiff
#13039 allow proper deletion of '>>> ' in IDLE editor windows.
authorTerry Jan Reedy <tjreedy@udel.edu>
Mon, 16 Jan 2012 00:03:23 +0000 (19:03 -0500)
committerTerry Jan Reedy <tjreedy@udel.edu>
Mon, 16 Jan 2012 00:03:23 +0000 (19:03 -0500)
Patch by Roger Serwy.

Lib/idlelib/EditorWindow.py

index 203a195593628ef27f9add13dc400d7f70856bbf..f47a9c13485369db87c65994142b8d17c06c414d 100644 (file)
@@ -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: