Persist undo-tree state between sessions.