From 956dd0c2bc4a430094fb60bb8210c9bbac510d36 Mon Sep 17 00:00:00 2001 From: Keith Simmons Date: Tue, 5 Jul 2022 16:44:45 -0700 Subject: [PATCH] fix error with reverse range marked text ranges --- crates/util/src/test/marked_text.rs | 2 +- crates/vim/src/normal.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/util/src/test/marked_text.rs b/crates/util/src/test/marked_text.rs index 3428728fab..4529c8c803 100644 --- a/crates/util/src/test/marked_text.rs +++ b/crates/util/src/test/marked_text.rs @@ -96,7 +96,7 @@ pub fn marked_text_ranges_by( .into_iter() .zip(ends) .map(|(start, end)| { - assert!(start >= end, "marked ranges must be disjoint"); + assert!(end >= start, "marked ranges must be disjoint"); end..start }) .collect::>>(); diff --git a/crates/vim/src/normal.rs b/crates/vim/src/normal.rs index 4c6dfd2d60..0f5aca7965 100644 --- a/crates/vim/src/normal.rs +++ b/crates/vim/src/normal.rs @@ -1181,4 +1181,7 @@ mod test { fox jumps|jumps over the lazy dog"}); } + + #[gpui::test] + async fn test_ }