* when removing comments, want to remove every comment in the range
This commit is contained in:
Rob McMullen 2017-04-27 13:33:11 -07:00
parent 184f9ac73d
commit 5438fa8dce

View File

@ -962,7 +962,8 @@ class DefaultSegment(object):
def clear_comment(self, ranges): def clear_comment(self, ranges):
self.clear_style_ranges(ranges, comment=True) self.clear_style_ranges(ranges, comment=True)
for start, end in ranges: for start, end in ranges:
rawindex = self.get_raw_index(start) for i in range(start, end):
rawindex = self.get_raw_index(i)
if rawindex in self.rawdata.extra.comments: if rawindex in self.rawdata.extra.comments:
del self.rawdata.extra.comments[rawindex] del self.rawdata.extra.comments[rawindex]