diff options
author | James Booth <boothj5@gmail.com> | 2015-12-19 23:21:07 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-12-19 23:21:07 +0000 |
commit | a02c89a8e8f6abe8935f6cf95e0b016d1ac40a34 (patch) | |
tree | d44d21f50e57fcfb95623c2113a1080c4e34b290 /src/ui | |
parent | e1f674eca39d5e8e7561753a30c417fd1b9a1488 (diff) | |
download | profani-tty-a02c89a8e8f6abe8935f6cf95e0b016d1ac40a34.tar.gz |
Use MB_CUR_MAX when calculating cursor position
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/inputwin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c index a6711bab..d5643f76 100644 --- a/src/ui/inputwin.c +++ b/src/ui/inputwin.c @@ -311,7 +311,7 @@ _inp_offset_to_col(char *str, int offset) while (i < offset && str[i] != '\0') { gunichar uni = g_utf8_get_char(&str[i]); - size_t ch_len = mbrlen(&str[i], 4, NULL); + size_t ch_len = mbrlen(&str[i], MB_CUR_MAX, NULL); i += ch_len; col++; if (g_unichar_iswide(uni)) { |