From 06e241117c8884dde26ccb144ac23920afcf842d Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 14 Dec 2021 13:04:51 -0800 Subject: [PATCH] Fix assertions in test for selection restoration after undo/redo Co-Authored-By: Nathan Sobo --- crates/editor/src/editor.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 42bfd30c0962f2b78b6ed556c3c5654c222327fa..880fe674983416e10a69b1650b93a416bde6bc47 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -3901,12 +3901,12 @@ mod tests { // Redo the first two transactions together. editor.redo(&Redo, cx); assert_eq!(editor.text(cx), "12cde6"); - assert_eq!(editor.selected_ranges(cx), vec![4..4]); + assert_eq!(editor.selected_ranges(cx), vec![5..5]); // Redo the last transaction on its own. editor.redo(&Redo, cx); assert_eq!(editor.text(cx), "ab2cde6"); - assert_eq!(editor.selected_ranges(cx), vec![5..5]); + assert_eq!(editor.selected_ranges(cx), vec![6..6]); // Test empty transactions. editor.start_transaction_at(now, cx);