diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-11-14 13:44:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-14 13:44:18 +0100 |
commit | 27f8b04f1791c29825bbe4b10e4a8db9472ecaee (patch) | |
tree | 1d8e2cd43baaca7f94ca08689b11231a128ec7cc /src/nvim/charset.c | |
parent | ee3a58d42e7fce666eef570db6f2944c29303d98 (diff) | |
parent | 71a4d275dc3fa71c656c0d2423f60904822aa223 (diff) | |
download | rneovim-27f8b04f1791c29825bbe4b10e4a8db9472ecaee.tar.gz rneovim-27f8b04f1791c29825bbe4b10e4a8db9472ecaee.tar.bz2 rneovim-27f8b04f1791c29825bbe4b10e4a8db9472ecaee.zip |
Merge pull request #16315 from bfredl/multibytes
refactor(multibyte): eliminate mb_* aliases for utf_* functions
Diffstat (limited to 'src/nvim/charset.c')
-rw-r--r-- | src/nvim/charset.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/charset.c b/src/nvim/charset.c index 8139eae131..5e18f9d86e 100644 --- a/src/nvim/charset.c +++ b/src/nvim/charset.c @@ -281,7 +281,7 @@ void trans_characters(char_u *buf, int bufsize) while (*buf != 0) { // Assume a multi-byte character doesn't need translation. - if ((trs_len = (*mb_ptr2len)(buf)) > 1) { + if ((trs_len = utfc_ptr2len(buf)) > 1) { len -= trs_len; } else { trs = transchar_byte(*buf); @@ -498,7 +498,7 @@ char_u *str_foldcase(char_u *str, int orglen, char_u *buf, int buflen) } // skip to next multi-byte char - i += (*mb_ptr2len)(STR_PTR(i)); + i += utfc_ptr2len(STR_PTR(i)); } @@ -732,7 +732,7 @@ int vim_strnsize(char_u *s, int len) assert(s != NULL); int size = 0; while (*s != NUL && --len >= 0) { - int l = (*mb_ptr2len)(s); + int l = utfc_ptr2len(s); size += ptr2cells(s); s += l; len -= l - 1; |