this bug was introduced by the feature "Undo/Redo should move the caret to the area of text being modified" requested in #1238