only-draw-visible-stuff #2
@@ -35,6 +35,12 @@ class HighlightRegex(Highlight):
|
||||
|
||||
def compute_highlight(self, line: Line) -> Optional[List[HighlightedRange]]:
|
||||
result = []
|
||||
|
||||
if len(self.query) == 0:
|
||||
# query is empty - this would result in many hits and is quite expensive
|
||||
# This happens with the highlighter we use for the selected text and maybe for the current filter query.
|
||||
return result
|
||||
|
||||
# print("execute regex: %s in %s" % (self.regex, line.line()))
|
||||
match_iter = re.finditer(self.regex, line.line())
|
||||
for match in match_iter:
|
||||
|
||||
Reference in New Issue
Block a user