Undo after save doesn't restore text if there are preceeding spaces.
Start with a file that looks like this
If you highlight the 1 (just the character, not the whole line) and hit delete, then save, when you undo, the 1 comes back. This is the expected behaviour.
Next go to a file that looks like this
Note that there is a single space in front of the 1. Highlight just
the 1 character and hit delete, then save, then undo. The undone section is highlighted as if it were
being undone, but the text isn't restored.
This appears both in 3.97b and 3.97c. It will work with just about any string.