correctly highlight lines with tabs
This commit is contained in:
@@ -36,11 +36,15 @@ class HighlightRegex(Highlight):
|
||||
match_iter = re.finditer(self.regex, line.line())
|
||||
for match in match_iter:
|
||||
# print("%s" % match)
|
||||
start = match.start(0)
|
||||
end = match.end(0)
|
||||
start_char = match.start(0)
|
||||
end_char = match.end(0)
|
||||
|
||||
start_column = line.char_to_column(start_char)
|
||||
end_column = line.char_to_column(end_char)
|
||||
|
||||
result.append(HighlightedRange(
|
||||
start,
|
||||
end - start,
|
||||
start_column,
|
||||
end_column - start_column,
|
||||
highlight_full_line=True,
|
||||
brush=self.brush(self.hit_background_color),
|
||||
brush_full_line=self.brush(self.line_background_color)
|
||||
|
||||
Reference in New Issue
Block a user