From 481c4ba0440a92a7873c49c37d4b76f90d585599 Mon Sep 17 00:00:00 2001 From: Nathan Vegdahl Date: Tue, 22 Jun 2021 19:05:56 -0700 Subject: [PATCH] Increment char_index by grapheme char count. It was just assuming single-char graphemes before. --- helix-term/src/ui/editor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index 4f1b4bca..550ff181 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -229,7 +229,7 @@ impl EditorView { visual_x += width; } - char_index += 1; + char_index += grapheme.chars().count(); } } }