@@ -27,9 +27,9 @@ pub struct Document {
2727
2828 /// Pending changes since last history commit.
2929 pub changes: ChangeSet,
30+ pub old_state: State,
3031 pub history: History,
3132 pub version: i64, // should be usize?
32− pub old_state: Option<(Rope, Selection)>,
3333
3434 pub diagnostics: Vec<Diagnostic>,
3535}
@@ -55,7 +55,7 @@ use url::Url;
5555impl Document {
5656 fn new(state: State) -> Self {
5757 let changes = ChangeSet::new(&state.doc);
58− let old_state = Some((state.doc.clone(), Selection::single(0, 0)));
58+ let old_state = state.clone();
5959
6060 Self {
6161 path: None,