From 8c7bc71ede213522efbcbb1b0fe91c0d47d2b47d Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Sun, 4 Oct 2020 17:42:36 +0900 Subject: Split on matches off by one, breaks tests again. --- helix-core/src/selection.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-core/src/selection.rs b/helix-core/src/selection.rs index 41dffa03..2251c77f 100644 --- a/helix-core/src/selection.rs +++ b/helix-core/src/selection.rs @@ -276,7 +276,7 @@ pub fn split_on_matches( // TODO: retain range direction let end = text.byte_to_char(start_byte + mat.start()); - result.push(Range::new(start, end)); + result.push(Range::new(start, end - 1)); start = text.byte_to_char(start_byte + mat.end()); } -- cgit v1.2.3-70-g09d2