clear selection highlight when query text changes

This commit is contained in:
2022-08-28 14:20:27 +02:00
parent 44a1c77d3c
commit bfe8ae460e
2 changed files with 10 additions and 0 deletions

View File

@@ -105,6 +105,9 @@ class BigText(QWidget):
def scroll_to_byte(self, byte_offset: int):
self.big_text.scroll_to_byte(byte_offset)
def clear_selection_highlight(self):
self.big_text.clear_selection_highlight()
def destruct(self):
self.watchdog.destruct()
pass
@@ -142,6 +145,11 @@ class InnerBigText(QWidget):
self.line_click_listeners: [Callable[[int], None]] = []
def clear_selection_highlight(self):
self.selection_highlight.start_byte = 0
self.selection_highlight.end_byte = 0
self._update_highlight_selected_text()
def keyPressEvent(self, e: QKeyEvent) -> None:
# print("%s + %s" % (e.keyCombination().keyboardModifiers(), e.key()))