Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.8
-
None
Description
If markContentsDirty is invoked on a document while an edit block is in progress (I ran into this scenario by calling rehighlight() on a QSyntaxHighligher), any slots connected to the document's contentsChange signal are not informed about changes that happened prior to the call.
See the attached reproduction project. It adds 3 characters, forces a re-highlight, and then adds another 3 characters.
If commenting out the highligher.rehighlightBlock call, we get:
Added 6 characters from 0
If not, we get:
Added 3 characters from 3
Which is wrong. I'd expect the slot to be invoked with all the changes, though perhaps more than once.