diff options
author | Nathan Vegdahl | 2021-06-23 02:05:56 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-06-23 03:43:09 +0000 |
commit | 481c4ba0440a92a7873c49c37d4b76f90d585599 (patch) | |
tree | 83fc4eac1c80818681d97ecf5a92fb27522f5095 /helix-term | |
parent | 0cbaa998ce3666285e543b9b1abfa8fa4764c446 (diff) |
Increment char_index by grapheme char count.
It was just assuming single-char graphemes before.
Diffstat (limited to 'helix-term')
-rw-r--r-- | helix-term/src/ui/editor.rs | 2 |
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(); } } } |