diff options
| author | Terry Jan Reedy <tjreedy@udel.edu> | 2012-01-15 19:03:23 -0500 |
|---|---|---|
| committer | Terry Jan Reedy <tjreedy@udel.edu> | 2012-01-15 19:03:23 -0500 |
| commit | da5706f8a718b1f6c6a5cfba3018848cbb6a4d9c (patch) | |
| tree | 919ff15f4c793fc65381353dea49a82f6d70cbb5 | |
| parent | a9cb20e5d95127a2f8bbedf914546517203f7a72 (diff) | |
| download | cpython-da5706f8a718b1f6c6a5cfba3018848cbb6a4d9c.tar.gz | |
#13039 allow proper deletion of '>>> ' in IDLE editor windows.
Patch by Roger Serwy.
| -rw-r--r-- | Lib/idlelib/EditorWindow.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index 203a195593..f47a9c1348 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: |
