diff options
Diffstat (limited to 'helix-core/src/state.rs')
-rw-r--r-- | helix-core/src/state.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/helix-core/src/state.rs b/helix-core/src/state.rs index fde6a866..7035b27c 100644 --- a/helix-core/src/state.rs +++ b/helix-core/src/state.rs @@ -47,6 +47,7 @@ impl State { #[must_use] pub fn new(doc: Rope) -> Self { let changes = ChangeSet::new(&doc); + let old_state = Some((doc.clone(), Selection::single(0, 0))); Self { path: None, @@ -56,7 +57,7 @@ impl State { restore_cursor: false, syntax: None, changes, - old_state: None, + old_state, } } |