cursor position is not logical after undo/redo
cursor position is not logical after undo/redo