diff -r 9468b094ae2b -r 0b600abb3074 Lib/idlelib/EditorWindow.py --- a/Lib/idlelib/EditorWindow.py Fri Oct 14 10:30:24 2011 -0500 +++ b/Lib/idlelib/EditorWindow.py Fri Oct 14 11:34:29 2011 -0500 @@ -1129,7 +1129,10 @@ 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: