only-draw-visible-stuff #2

Merged
andi merged 5 commits from only-draw-visible-stuff into master 2022-12-19 17:00:19 +00:00
Showing only changes of commit 493649dad5 - Show all commits

View File

@@ -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: