Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7f53aea

Browse files
committed
#13039 allow proper deletion of '>>> ' in IDLE editor windows.
Patch by Roger Serwy.
1 parent 63e6c32 commit 7f53aea

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Lib/idlelib/EditorWindow.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,10 @@ def smart_backspace_event(self, event):
11341134
assert have > 0
11351135
want = ((have - 1) // self.indentwidth) * self.indentwidth
11361136
# Debug prompt is multilined....
1137-
last_line_of_prompt = sys.ps1.split('\n')[-1]
1137+
if self.context_use_ps1:
1138+
last_line_of_prompt = sys.ps1.split('\n')[-1]
1139+
else:
1140+
last_line_of_prompt = ''
11381141
ncharsdeleted = 0
11391142
while 1:
11401143
if chars == last_line_of_prompt:

0 commit comments

Comments
 (0)