Refactor: Remove occurences of mb_char2bytes

This commit is contained in:
ZviRackover
2018-09-02 00:58:30 +03:00
parent 50eadfe2e9
commit cbdbc4f63d
17 changed files with 54 additions and 55 deletions

View File

@@ -2132,7 +2132,7 @@ int ins_compl_add_infercase(char_u *str, int len, int icase, char_u *fname, int
i = 0;
while (i < actual_len && (p - IObuff + 6) < IOSIZE) {
if (has_mbyte) {
p += (*mb_char2bytes)(wca[i++], p);
p += utf_char2bytes(wca[i++], p);
} else {
*(p++) = wca[i++];
}
@@ -3087,7 +3087,7 @@ static void ins_compl_addleader(int c)
if (has_mbyte && (cc = (*mb_char2len)(c)) > 1) {
char_u buf[MB_MAXBYTES + 1];
(*mb_char2bytes)(c, buf);
utf_char2bytes(c, buf);
buf[cc] = NUL;
ins_char_bytes(buf, cc);
} else {
@@ -5337,7 +5337,7 @@ insertchar (
if (has_mbyte && (cc = (*mb_char2len)(c)) > 1) {
char_u buf[MB_MAXBYTES + 1];
(*mb_char2bytes)(c, buf);
utf_char2bytes(c, buf);
buf[cc] = NUL;
ins_char_bytes(buf, cc);
AppendCharToRedobuff(c);
@@ -8661,7 +8661,7 @@ static char_u *do_insert_char_pre(int c)
return NULL;
}
if (has_mbyte) {
buf[(*mb_char2bytes)(c, (char_u *) buf)] = NUL;
buf[utf_char2bytes(c, (char_u *) buf)] = NUL;
} else {
buf[0] = c;
buf[1] = NUL;