Hi! I’m working with unifiedMergeView from @codemirror/merge, and I boiled my issue down to this:
In a unifiedMergeView editor, I have a transactionExtender which, in some cases, adds an originalDocChangeEffect. I notice that this effect does not take effect directly (at least – it does not render directly).
Am I using transactionExtender wrong, or am I missing something?
To demonstrate this, I wrote a small showcase that uses transactionExtender for this:
Any time that your document is updated to contain the text alice, the original document is updated to add bob as the first three characters.
You can tell that when the text alice is completed, the diff is in a broken state. The next keystroke fixes it:
For context – I am trying to use the unifiedMergeView with one modification: if you edit the document outside of a chunk, I want “no new chunk to be created”. I.e. editing outside a chunk should also edit the original document.
The unified diff is using a transaction extender itself to notice these effects, and extenders don’t see each other’s output. If you switch to a transaction filter, that might work better.
Thank you, indeed using a transaction filter fixed my issue! Here is a playground.
I saw your recent commit, and I tried it out. Strangely, this actually broke my use case again. With this commit, neither the transaction filter nor extender approach work.
Not sure if this helps – I found that the issue is also there when reconfiguring to add a new merge extension (instead of modifying the original, as in your fix). Here is a playground to demonstrate the issue. The fix commit has no effect on this behaviour. I can workaround this issue in a couple of ways, so it is not a crucial issue for me.