summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2012-01-16 00:03:23 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2012-01-16 00:03:23 (GMT)
commit7f53aea53b4b1d0da69d004e57715d3943797b26 (patch)
treeee496c84732ad86b83b621937c874136d5942ec9 /Lib/idlelib
parent63e6c3222f563cfb156de6e92199e9e35ad5d832 (diff)
downloadcpython-7f53aea53b4b1d0da69d004e57715d3943797b26.zip
cpython-7f53aea53b4b1d0da69d004e57715d3943797b26.tar.gz
cpython-7f53aea53b4b1d0da69d004e57715d3943797b26.tar.bz2
#13039 allow proper deletion of '>>> ' in IDLE editor windows.
Patch by Roger Serwy.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/EditorWindow.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index 203a195..f47a9c1 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: