summaryrefslogtreecommitdiff
path: root/helix-view/src
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src')
-rw-r--r--helix-view/src/document.rs3
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) {