mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Fix tag highlighting breaking when a line is edited because of stale user data
This commit is contained in:
parent
d59f9c6f73
commit
b34eb8f460
@ -53,6 +53,7 @@ class SyntaxHighlighter(QSyntaxHighlighter):
|
||||
def highlightBlock(self, text):
|
||||
try:
|
||||
state = self.previousBlockState()
|
||||
self.setCurrentBlockUserData(None) # Ensure that any stale user data is discarded
|
||||
if state == -1:
|
||||
state = 0
|
||||
state = self.state_class(state)
|
||||
|
Loading…
x
Reference in New Issue
Block a user