diff options
Diffstat (limited to 'helix-view/src/document.rs')
-rw-r--r-- | helix-view/src/document.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index 4d3586f1..13ffe794 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -941,7 +941,8 @@ impl Document { } pub fn savepoint(&mut self) { - self.savepoint = Some(Transaction::new(self.text())); + self.savepoint = + Some(Transaction::new(self.text()).with_selection(self.selection(view.id).clone())); } pub fn restore(&mut self, view: &mut View) { |