mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
...
This commit is contained in:
parent
a9d96d8d77
commit
fd7cbbe464
@ -142,11 +142,14 @@ class TextEdit(QPlainTextEdit):
|
||||
sel = QTextEdit.ExtraSelection()
|
||||
sel.format.setBackground(self.highlight_color)
|
||||
sel.cursor = self.textCursor()
|
||||
if sel.cursor.hasSelection():
|
||||
self.current_search_mark = sel
|
||||
self.update_extra_selections()
|
||||
c = self.textCursor()
|
||||
c.clearSelection()
|
||||
self.setTextCursor(c)
|
||||
else:
|
||||
self.current_search_mark = None
|
||||
self.update_extra_selections()
|
||||
|
||||
# Line numbers and cursor line {{{
|
||||
def highlight_cursor_line(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user