diff --git a/helix-core/src/graphemes.rs b/helix-core/src/graphemes.rs index 786f6a688..e436062aa 100644 --- a/helix-core/src/graphemes.rs +++ b/helix-core/src/graphemes.rs @@ -62,7 +62,7 @@ pub fn nth_prev_grapheme_boundary(slice: RopeSlice, char_idx: usize, n: usize) - } } } - let tmp = byte_to_char_idx(chunk, byte_idx + chunk_byte_idx); + let tmp = byte_to_char_idx(chunk, byte_idx - chunk_byte_idx); chunk_char_idx + tmp }