Add undo recording.