File tree Expand file tree Collapse file tree
src/calibre/gui2/tweak_book/editor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -625,14 +625,17 @@ def go_to_anchor(self, anchor):
625625
626626 # Line numbers and cursor line {{{
627627 def highlight_cursor_line (self ):
628+ if self .highlighter .is_working :
629+ QTimer .singleShot (10 , self .highlight_cursor_line )
630+ return
628631 sel = QTextEdit .ExtraSelection ()
629632 sel .format .setBackground (self .palette ().alternateBase ())
630633 sel .format .setProperty (QTextFormat .Property .FullWidthSelection , True )
631634 sel .cursor = self .textCursor ()
632635 sel .cursor .clearSelection ()
633636 self .current_cursor_line = [sel ]
634637
635- # apply any formats that have a backgroud over the cursor line format
638+ # apply any formats that have a background over the cursor line format
636639 # to ensure they are visible
637640 c = self .textCursor ()
638641 block = c .block ()
You can’t perform that action at this time.
0 commit comments