on master help sign in
Split on matches off by one, breaks tests again.
8c7bc71Blaž Hrastnik
helix-core/src/selection.rs+1−1
@@ -276,7 +276,7 @@ pub fn split_on_matches(
276 // TODO: retain range direction
276 // TODO: retain range direction
277
277
278 let end = text.byte_to_char(start_byte + mat.start());
278 let end = text.byte_to_char(start_byte + mat.start());
279− result.push(Range::new(start, end));
279+ result.push(Range::new(start, end - 1));
280 start = text.byte_to_char(start_byte + mat.end());
280 start = text.byte_to_char(start_byte + mat.end());
281 }
281 }
282
282