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…
I have seen other cases where codemirror has these kinds of undo issues. This is due to the particulary way it handles history. If you find other examples where this happens, open a BR directly to them.
This is not a bug in Obsidian per se. Or at least Obsidian team can’t (won’t?) fix the issue in their own code. So this bug report details should be reported directly to the Codemirror team.
Where can I find what version of Codemirror Obsidian uses? I am sure Codemirror developers want to know such detail.
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. marijnh closed this issue 8 days ago