diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-09-01 19:46:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-01 19:46:46 +0200 |
commit | f62d4865d88de0bd60218ecb3e08d9f3c772e12e (patch) | |
tree | 54bd16926bb85b51273e6dce61f4d85c45e01839 /src/nvim/mbyte.c | |
parent | 064495a53ace225626289e7143b5520b38e3f5fc (diff) | |
parent | a3549286b24000dcdd4411bd5faf637e1c9a0d3d (diff) | |
download | rneovim-f62d4865d88de0bd60218ecb3e08d9f3c772e12e.tar.gz rneovim-f62d4865d88de0bd60218ecb3e08d9f3c772e12e.tar.bz2 rneovim-f62d4865d88de0bd60218ecb3e08d9f3c772e12e.zip |
Merge #8934 'Remove mb_ptr2len_len, mb_ptr2cells, mb_ptr2cells_len'
Diffstat (limited to 'src/nvim/mbyte.c')
-rw-r--r-- | src/nvim/mbyte.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index 11c1897153..0ee8e2bd85 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -550,7 +550,7 @@ size_t mb_string2cells(const char_u *str) size_t clen = 0; for (const char_u *p = str; *p != NUL; p += (*mb_ptr2len)(p)) { - clen += (*mb_ptr2cells)(p); + clen += utf_ptr2cells(p); } return clen; @@ -2124,8 +2124,9 @@ static char_u *iconv_string(const vimconv_T *const vcp, char_u *str, * conversion from 'encoding' to something else. In other * situations we don't know what to skip anyway. */ *to++ = '?'; - if ((*mb_ptr2cells)((char_u *)from) > 1) + if (utf_ptr2cells((char_u *)from) > 1) { *to++ = '?'; + } l = utfc_ptr2len_len((const char_u *)from, (int)fromlen); from += l; fromlen -= l; |