mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-22 06:06:16 +01:00
Fix tag highlighting breaking when a line is edited because of stale user data
This commit is contained in:
parent
d59f9c6f73
commit
b34eb8f460
1 changed files with 1 additions and 0 deletions
|
|
@ -53,6 +53,7 @@ def create_formats(self):
|
|||
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…
Reference in a new issue