mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 23:38:17 +00:00
Refactor: Remove occurences of mb_char2bytes
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user