Unnamed repository; edit this file 'description' to name the repository.
Increment char_index by grapheme char count.
It was just assuming single-char graphemes before.
Nathan Vegdahl 2021-06-23
parent 0cbaa99 · commit 481c4ba
-rw-r--r--helix-term/src/ui/editor.rs2
1 files changed, 1 insertions, 1 deletions
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();
}
}
}