aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/transaction.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-core/src/transaction.rs')
-rw-r--r--helix-core/src/transaction.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/helix-core/src/transaction.rs b/helix-core/src/transaction.rs
index 0e49fbe3..dfc18fbe 100644
--- a/helix-core/src/transaction.rs
+++ b/helix-core/src/transaction.rs
@@ -468,6 +468,13 @@ impl Transaction {
}
}
+ pub fn compose(mut self, other: Self) -> Self {
+ self.changes = self.changes.compose(other.changes);
+ // Other selection takes precedence
+ self.selection = other.selection;
+ self
+ }
+
pub fn with_selection(mut self, selection: Selection) -> Self {
self.selection = Some(selection);
self