Increment char_index by grapheme char count.
It was just assuming single-char graphemes before.
commit481c4ba0440a92a7873c49c37d4b76f90d585599
authorNathan Vegdahl <cessen@cessen.com>
dateTue 22 Jun 2021, 19:05 (5 years ago)
parent0cbaa99
helix-term/src/ui/editor.rs+1−1
@@ -229,7 +229,7 @@ impl EditorView {
229229 visual_x += width;
230230 }
231231
232− char_index += 1;
232+ char_index += grapheme.chars().count();
233233 }
234234 }
235235 }