summaryrefslogtreecommitdiff
path: root/helix-core/src
diff options
context:
space:
mode:
authorBlaž Hrastnik2022-11-08 13:20:32 +0000
committerBlaž Hrastnik2022-11-08 13:20:32 +0000
commitbb303cf41d5bd02641bf436e07b08bd4ae5418de (patch)
tree7cbd11f33a69a35e87513e3c2aef43eac6de88ac /helix-core/src
parentcd8bbbc0443554125d375ec764d174c68f3ac710 (diff)
fix tests
Diffstat (limited to 'helix-core/src')
-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());