on master help sign in
fix tests
bb303cfBlaž Hrastnik
helix-core/src/transaction.rs+4−1
@@ -704,7 +704,10 @@ mod test {
704
704
705 #[test]
705 #[test]
706 fn optimized_composition() {
706 fn optimized_composition() {
707− let mut state = State::new("".into());
707+ let mut state = State {
708+ doc: "".into(),
709+ selection: Selection::point(0),
710+ };
708 let t1 = Transaction::insert(&state.doc, &state.selection, Tendril::from("h"));
711 let t1 = Transaction::insert(&state.doc, &state.selection, Tendril::from("h"));
709 t1.apply(&mut state.doc);
712 t1.apply(&mut state.doc);
710 state.selection = state.selection.clone().map(t1.changes());
713 state.selection = state.selection.clone().map(t1.changes());