undo should restore primary caret properly (IDEA-80056)