Skip to content
Permalink
Browse files
Edit book: When auto-closing tags on typing </ fix occasionally incor…
…rect tag being closed in large files because syntax highlighting has not competed
  • Loading branch information
kovidgoyal committed Jun 3, 2019
1 parent cff789f commit 13eb6795e6911885c93eea7380e982c8b4e60a4c
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/calibre/gui2/tweak_book/editor/smarts/html.py
@@ -692,6 +692,7 @@ def check_if_in_tag(block, offset=0):
return True
return False

editor.highlighter.join()
c = editor.textCursor()
block, offset = c.block(), c.positionInBlock()
if check_if_in_tag(block, offset) or check_if_in_tag(block.next()):

0 comments on commit 13eb679

Please sign in to comment.