Fix off-by-one error in Tim's recent change to comment_region(): the

list of lines returned by get_region() contains an empty line at the
end representing the start of the next line, and this shouldn't be
commented out!
This commit is contained in:
Guido van Rossum 1999-06-10 14:44:48 +00:00
parent a3b4a33f3b
commit e2571f2ce7
1 changed files with 1 additions and 1 deletions

View File

@ -347,7 +347,7 @@ class AutoIndent:
def comment_region_event(self, event):
head, tail, chars, lines = self.get_region()
for pos in range(len(lines)):
for pos in range(len(lines) - 1):
line = lines[pos]
lines[pos] = '##' + line
self.set_region(head, tail, chars, lines)