mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-17 18:55:24 +01:00
...
This commit is contained in:
parent
a9d96d8d77
commit
fd7cbbe464
1 changed files with 7 additions and 4 deletions
|
|
@ -142,11 +142,14 @@ def mark_selected_text(self):
|
|||
sel = QTextEdit.ExtraSelection()
|
||||
sel.format.setBackground(self.highlight_color)
|
||||
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()
|
||||
c = self.textCursor()
|
||||
c.clearSelection()
|
||||
self.setTextCursor(c)
|
||||
|
||||
# Line numbers and cursor line {{{
|
||||
def highlight_cursor_line(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue