If you type quickly and make a mistake, like using the “delete line” shortcut on macos, Obsidian doesn’t restore your text on CMD+Z.
Here is a screen cap of losing a complete sentence to Obsidian’s Undo:
I try to use CMD+Z at the end of the video, but Obsidian “forgot” my sentence.
I couldn’t reproduce this issue on other editors or text inputs.
Is there a fix somewhere? I can’t count how often I lost whole sentences to a typo.
Did you mean “Delete Paragraph”? Cmd-D?
- I can reproduce this on MacOS 12.6.3 Monterey.
- Obsidian 1.4.0 (installer 1.3.5)
- Tested in the Sandbox vault.
- I haven’t tested in Windows.
If I am typing, and then type “Cmd-D” to delete the paragraph, then that paragraph is lost, and the undo stack restores something older.
If I wait about 1 or 2 seconds, the effect doesn’t happen. It only seems to happen if you trigger the command quickly after typing your last character(s).
(Often people make bug reports that should have been posted in help. This seems to be the opposite. I think it would have been better for you to fill out the template and report a bug. I’m just going to move it to Bug Reports.)
I think it’s better if your rewrite this as a BR and you are specific about what specifically should be handled differently. The undo logic is very complex.
There is no “Delete Paragraph” command in that CodeMirror link.
As for what specifically should be handled differently, the Obsidian “Delete Paragraph” command should register in the undo stack.
Do deletetoLineStart and End work in Obsidian and Codemirror website?
1 Like
No, they are both broken too.
I see, BR should be upstream with CodeMirror.
Did you mean “Delete Paragraph”? Cmd-D?
No, I mean Delete Line, CMD + DELETE
Looks like I’ve been heard, and you’re on it. Thanks team for looking into this 
1 Like