diff options
author | KunMing Xie <qqzz014@gmail.com> | 2018-06-10 18:31:51 +0800 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-06-10 12:31:51 +0200 |
commit | 7cc9d2b2b2e2cc4e78bf37512ac03ded3e18d6c1 (patch) | |
tree | 1c0e9383b3c201c12f3d7bcdb7d0b5c6d95bb570 /src/nvim/message.c | |
parent | bbb88607c9cc60a6fa332382e9a8cc0c8726c03f (diff) | |
download | rneovim-7cc9d2b2b2e2cc4e78bf37512ac03ded3e18d6c1.tar.gz rneovim-7cc9d2b2b2e2cc4e78bf37512ac03ded3e18d6c1.tar.bz2 rneovim-7cc9d2b2b2e2cc4e78bf37512ac03ded3e18d6c1.zip |
vim-patch:8.0.0520: using a function pointer while the function is known (#8513)
Problem: Using a function pointer instead of the actual function, which we
know.
Solution: Change mb_ functions to utf_ functions when already checked for
Unicode. (Dominique Pelle, closes vim/vim#1582)
https://github.com/vim/vim/commit/ace95989ed81929a84e205b26d0972cb9d6b4b19
Diffstat (limited to 'src/nvim/message.c')
-rw-r--r-- | src/nvim/message.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c index fba61e53a7..188e3544e6 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -286,7 +286,7 @@ void trunc_string(char_u *s, char_u *buf, int room_in, int buflen) half = i = (int)STRLEN(s); for (;;) { do { - half = half - (*mb_head_off)(s, s + half - 1) - 1; + half = half - utf_head_off(s, s + half - 1) - 1; } while (half > 0 && utf_iscomposing(utf_ptr2char(s + half))); n = ptr2cells(s + half); if (len + n > room || half == 0) { |