Persist undo history across sessions