highlight matches

This commit is contained in:
2021-10-28 10:22:15 +02:00
parent dbfe0bebf8
commit cdd382858a
4 changed files with 34 additions and 8 deletions

View File

@@ -250,7 +250,10 @@ class InnerBigText(QWidget):
for l in self.lines:
self.update_longest_line(len(l.line()))
highlighters = self.model.highlights + [self.selection_highlight]
highlighters = self.model.highlights
if self.model.get_query_highlight():
highlighters = highlighters + [self.model.get_query_highlight()]
highlighters = highlighters + [self.selection_highlight] # selection highlight should be last
# draw hightlights first - some characters may overlap to the next line
# by drawing the background hightlights first we prevent that the hightlight