Undo Bug (Undoing after replacing text will only undo the last text replaced and so on)

Steps to reproduce

Replacing text with the specified hotkey (in my case it’s Ctrl+H) and then choosing the “replace all” function, then undoing the action (Ctrl+Z) undoes each replaced text individually instead of in a single undo stroke.
Example

Original text: Hello there, my hairy friend, named Harry!
Replace: “H” with “F”
New Text: Fello there, my fairy friend, named Farry!
(Hmm, now I regret the change, I’ll just undo the action with Ctrl-z :slightly_smiling_face:)

Expected result

Ctrl-z
Final text: Hello there, my hairy friend, named Harry!

Actual result

Ctrl-z
Final text: Fello there, my fairy friend, named Harry!

Ctrl-z
Final text: Fello there, my hairy friend, named Harry!

Ctrl-z
Final text: Hello there, my hairy friend, named Harry!

Environment

  • Operating system: Windows 10 Home
  • Obsidian version: 0.7.3

Additional information

Using CSS.

Will be fixed in 0.7.5

1 Like