In replace mode record text typing as one undo action