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