Steps to reproduce
- Select any text in the editor
- Apply formatting that add some text (e.g. make text bold
- Undo the change with Undo command (e.g. press ⌘-Z)
- Observe how selection shifted by the number of removed characters
I’d expect the selection to match the initial selection.
- Operating system: macOS 11.2
- Obsidian version: v0.11.7
This can be reproduced with all source-changing commands I tried (e.g. bold, italic, highlight).
This can not be reproduced when surrounding test is typed: e.g. select a word and type
* (or a brace, backtick, etc.), undo will correctly maintain the selection.