Persist undo history for buffers