aboutsummaryrefslogtreecommitdiff
path: root/helix-core
diff options
context:
space:
mode:
authorBlaž Hrastnik2020-10-04 08:42:36 +0000
committerBlaž Hrastnik2020-10-13 14:13:56 +0000
commit8c7bc71ede213522efbcbb1b0fe91c0d47d2b47d (patch)
tree6d2a8a8654db0c0f35abc55b7185794d74bbc8e1 /helix-core
parentfd311fb8ad8792c8f21ed0bcf56d4a818715d5f7 (diff)
Split on matches off by one, breaks tests again.
Diffstat (limited to 'helix-core')
-rw-r--r--helix-core/src/selection.rs2
1 files changed, 1 insertions, 1 deletions
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());
}