diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2012-01-16 00:02:50 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2012-01-16 00:02:50 (GMT) |
commit | 8ef4a70a48daa451fca6d59a6129f49389e5b0fe (patch) | |
tree | ea973a4f6f6a369646d62c8df199b69873eb32f2 /Lib/idlelib/EditorWindow.py | |
parent | bde7eacd85cd1e75efec162a1296942c39cc9f4d (diff) | |
download | cpython-8ef4a70a48daa451fca6d59a6129f49389e5b0fe.zip cpython-8ef4a70a48daa451fca6d59a6129f49389e5b0fe.tar.gz cpython-8ef4a70a48daa451fca6d59a6129f49389e5b0fe.tar.bz2 |
#13039 allow proper deletion of '>>> ' in IDLE editor windows.
Patch by Roger Serwy.
Diffstat (limited to 'Lib/idlelib/EditorWindow.py')
-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 f16badb..1230047 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: |