summaryrefslogtreecommitdiff
path: root/helix-core/src/transaction.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2020-09-13 10:51:42 +0000
committerBlaž Hrastnik2020-09-13 10:51:42 +0000
commitfb0f56b7472d221e57b2bec13c9c8668fe673e77 (patch)
treed294eaa9b633ecb6d2a37234007edbba4667d739 /helix-core/src/transaction.rs
parenteb6b9a9ca958b0141a4cf6cc4dc59781e905fcc7 (diff)
Add 'o' command.
Diffstat (limited to 'helix-core/src/transaction.rs')
-rw-r--r--helix-core/src/transaction.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/helix-core/src/transaction.rs b/helix-core/src/transaction.rs
index 7fbcbf6c..3d03de19 100644
--- a/helix-core/src/transaction.rs
+++ b/helix-core/src/transaction.rs
@@ -339,6 +339,11 @@ impl Transaction {
true
}
+ pub fn with_selection(mut self, selection: Selection) -> Self {
+ self.selection = Some(selection);
+ self
+ }
+
/// Generate a transaction from a set of changes.
// TODO: take an owned iter instead of Vec
pub fn change(state: &State, changes: Vec<Change>) -> Self {