Added selection state serialization to the saved history.