[TextEditor] Be more careful with stacking keyboard undo steps.