Preserving selection and expansion states between revision changes