Every selection change should create a new undo step.
Check:
Expected: 3 undo steps were created. It is possible to undo 3 times, each time 3 letters from steps 5, 3, 1 are undone.