[TextEditor] Improved atomic undo operation type handling (works now
on multiple undo levels).