diff options
author | Blaž Hrastnik | 2021-02-26 06:53:01 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-02-26 06:53:01 +0000 |
commit | ad58286dc7e1f37d0b9edf4a0ee9b5f48ab026a9 (patch) | |
tree | 6c447e51c775c570f8e1808382f3051148a68652 /helix-core/src | |
parent | 1ae7c4339194c6f988202b24cd910d8c2edea737 (diff) |
graphemes: fix nth_prev_grapheme_boundary calculation.
Diffstat (limited to 'helix-core/src')
-rw-r--r-- | helix-core/src/graphemes.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-core/src/graphemes.rs b/helix-core/src/graphemes.rs index 786f6a68..e436062a 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 } |