mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 13:38:34 +00:00
Refactor: Remove occurences of mb_char2bytes
This commit is contained in:
@@ -315,7 +315,7 @@ static void add_char_buff(buffheader_T *buf, int c)
|
||||
if (IS_SPECIAL(c)) {
|
||||
len = 1;
|
||||
} else {
|
||||
len = mb_char2bytes(c, bytes);
|
||||
len = utf_char2bytes(c, bytes);
|
||||
}
|
||||
|
||||
for (int i = 0; i < len; i++) {
|
||||
@@ -978,7 +978,7 @@ void ins_char_typebuf(int c)
|
||||
buf[2] = (char_u)K_THIRD(c);
|
||||
buf[3] = NUL;
|
||||
} else {
|
||||
buf[(*mb_char2bytes)(c, buf)] = NUL;
|
||||
buf[utf_char2bytes(c, buf)] = NUL;
|
||||
}
|
||||
(void)ins_typebuf(buf, KeyNoremap, 0, !KeyTyped, cmd_silent);
|
||||
}
|
||||
@@ -3661,7 +3661,7 @@ int check_abbr(int c, char_u *ptr, int col, int mincol)
|
||||
/* if ABBR_OFF has been added, remove it here */
|
||||
if (c >= ABBR_OFF)
|
||||
c -= ABBR_OFF;
|
||||
j += (*mb_char2bytes)(c, tb + j);
|
||||
j += utf_char2bytes(c, tb + j);
|
||||
} else {
|
||||
tb[j++] = (char_u)c;
|
||||
}
|
||||
|
Reference in New Issue
Block a user