mirror of
https://github.com/python/cpython.git
synced 2024-11-26 19:34:19 +08:00
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:
parent
a3b4a33f3b
commit
e2571f2ce7
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user