]> granicus.if.org Git - python/commitdiff
Hm. There was a boundary condition error at the end of the file too.
authorGuido van Rossum <guido@python.org>
Mon, 4 Jan 1999 21:19:09 +0000 (21:19 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 4 Jan 1999 21:19:09 +0000 (21:19 +0000)
Tools/idle/FormatParagraph.py

index cc1b36a6e72c26c3b82f17688672feddb558fbff..1d0db120f02feb9ad3d6274278d5c6b947551eaa 100644 (file)
@@ -46,7 +46,7 @@ class FormatParagraph:
 def find_paragraph(text, mark):
     lineno, col = map(int, string.split(mark, "."))
     line = text.get("%d.0" % lineno, "%d.0 lineend" % lineno)
-    while is_all_white(line):
+    while text.compare("%d.0" % lineno, "<", "end") and is_all_white(line):
         lineno = lineno + 1
         line = text.get("%d.0" % lineno, "%d.0 lineend" % lineno)
     first_lineno = lineno