Select one line with the name of the channel (in this case “DistroTube”)
Write "Test " in a document.
Press Ctrl+Ins(Ctrl+C) to copy.
Go to Obsidian document and write "Test ".
Press Shift+Ins (Ctrl+V) to paste. The result should look like this:
Test [DistroTube](https://www.youtube.com/channel/UCVls1GmFKf6WlTraIb_IaJg)
7. BUG: Press Ctrl+Z to undo. You will see that the whole line will be deleted, not only the youtube link.
Expected result
Only the last step should be undoed. Typing and pasting are clearly two different steps/activities.
Environment
Operating system: Linux Mint 20.2 Cinnamon
Obsidian version: 0.12.10
Additional information
This bug shows itself with youtube channel links. Everything works fine with most other copy-pasted text. Including if you paste+select+copy the same exact youtube channel link and try to reproduce the bug…
The text was updated successfully, but these errors were encountered:
Sorry, I'm not debugging problems that involve integrations. And more generally, not very sure that this is a CodeMirror bug. It sounds like the Obsidian link pasting behavior replaces the entire line, and that's what's causing this behavior.
That's by design -- replaceSelection defaults to setting the "origin" of the change to +input, which allows the change to be merge with other plain input changes. Call .replaceSelection("test", false, "customOrigin") to avoid this.
I am using Obsidian knowledge base editor.
I found a bug in it, reported it to the developers, but it was shot down on the grounds of "it is a CodeMirror bug". Hence I am writing to you.
Here is a copy&paste of my original bug report:
Steps to reproduce
7. BUG: Press Ctrl+Z to undo. You will see that the whole line will be deleted, not only the youtube link.
Expected result
Only the last step should be undoed. Typing and pasting are clearly two different steps/activities.
Environment
Additional information
This bug shows itself with youtube channel links. Everything works fine with most other copy-pasted text. Including if you paste+select+copy the same exact youtube channel link and try to reproduce the bug…
The text was updated successfully, but these errors were encountered: