summaryrefslogtreecommitdiff
path: root/helix-core/src/graphemes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-core/src/graphemes.rs')
-rw-r--r--helix-core/src/graphemes.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/helix-core/src/graphemes.rs b/helix-core/src/graphemes.rs
index aa898684..c0c61775 100644
--- a/helix-core/src/graphemes.rs
+++ b/helix-core/src/graphemes.rs
@@ -333,10 +333,7 @@ impl<'a> Iterator for RopeGraphemes<'a> {
}
if a < self.cur_chunk_start {
- let a_char = self.text.byte_to_char(a);
- let b_char = self.text.byte_to_char(b);
-
- Some(self.text.slice(a_char..b_char))
+ Some(self.text.byte_slice(a..b))
} else {
let a2 = a - self.cur_chunk_start;
let b2 = b - self.cur_chunk_start;