diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-06-06 05:45:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-06 05:45:59 +0800 |
commit | ae02c02f1f71e8e3a5324c4857a03156c0691ad8 (patch) | |
tree | f6db1ec63d4d0ace7a4253321a57a933f0d37911 /src/nvim/getchar.c | |
parent | e4df1c9b9e61e79234684d30ca700b42f82bc34a (diff) | |
download | rneovim-ae02c02f1f71e8e3a5324c4857a03156c0691ad8.tar.gz rneovim-ae02c02f1f71e8e3a5324c4857a03156c0691ad8.tar.bz2 rneovim-ae02c02f1f71e8e3a5324c4857a03156c0691ad8.zip |
vim-patch:8.2.5058: input() does not handle composing characters properly (#18872)
Problem: input() does not handle composing characters properly.
Solution: Use mb_cptr2char_adv() instead of mb_ptr2char_adv().
(closes vim/vim#10527)
https://github.com/vim/vim/commit/e3a529bc877909a9eccf792461050b4f6737ed33
Cherry-pick all of Test_input_func() from patch 8.2.0316.
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r-- | src/nvim/getchar.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 85ac52cafd..e532735bef 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -629,7 +629,7 @@ void stuffReadbuffSpec(const char *s) stuffReadbuffLen(s, 3); s += 3; } else { - int c = mb_ptr2char_adv((const char_u **)&s); + int c = mb_cptr2char_adv((const char_u **)&s); if (c == CAR || c == NL || c == ESC) { c = ' '; } |