summaryrefslogtreecommitdiff
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.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/helix-core/src/transaction.rs b/helix-core/src/transaction.rs
index 2f9eb090..3fb39413 100644
--- a/helix-core/src/transaction.rs
+++ b/helix-core/src/transaction.rs
@@ -704,7 +704,10 @@ mod test {
#[test]
fn optimized_composition() {
- let mut state = State::new("".into());
+ let mut state = State {
+ doc: "".into(),
+ selection: Selection::point(0),
+ };
let t1 = Transaction::insert(&state.doc, &state.selection, Tendril::from("h"));
t1.apply(&mut state.doc);
state.selection = state.selection.clone().map(t1.changes());