From 8a920c559ec4b3817f49551a84a18fd2540ebe02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Tue, 8 Nov 2022 22:20:32 +0900 Subject: [PATCH] fix tests --- helix-core/src/transaction.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/helix-core/src/transaction.rs b/helix-core/src/transaction.rs index 2f9eb090323e9..3fb394138a1e8 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());