[Python-checkins] CVS: python/dist/src/Tools/idle PyParse.py,1.5,1.6
Guido van Rossum
guido@cnri.reston.va.us
Mon, 13 Mar 2000 09:50:26 -0500 (EST)
Update of /projects/cvsroot/python/dist/src/Tools/idle
In directory eric:/projects/python/develop/guido/src/Tools/idle
Modified Files:
PyParse.py
Log Message:
Tim Peters writes:
Fix bad auto-indent I recently introduced when replacing the regexp that
could cause re to blow up:
if or_any_other_block_opener:
# one indenting comment line
^ cursor ended up at the caret (the bug)
^ but belongs here (the post-patch behavior)
Index: PyParse.py
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Tools/idle/PyParse.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** PyParse.py 2000/03/03 14:51:11 1.5
--- PyParse.py 2000/03/13 14:50:24 1.6
***************
*** 386,396 ****
if m:
# we skipped at least one boring char
! p = m.end()
# back up over totally boring whitespace
! i = p-1 # index of last boring char
! while i >= 0 and str[i] in " \t\n":
i = i-1
! if i >= 0:
lastch = str[i]
if p >= q:
break
--- 386,397 ----
if m:
# we skipped at least one boring char
! newp = m.end()
# back up over totally boring whitespace
! i = newp - 1 # index of last boring char
! while i >= p and str[i] in " \t\n":
i = i-1
! if i >= p:
lastch = str[i]
+ p = newp
if p >= q:
break