collapse typed words on the undo log