mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 07:48:18 +00:00
refactor: remove char_u (#22829)
Closes https://github.com/neovim/neovim/issues/459
This commit is contained in:
@@ -1189,7 +1189,7 @@ static char *translate_mapping(char *str_in, int cpo_flags)
|
||||
str += 2;
|
||||
}
|
||||
if (IS_SPECIAL(c) || modifiers) { // special key
|
||||
ga_concat(&ga, (char *)get_special_key_name(c, modifiers));
|
||||
ga_concat(&ga, get_special_key_name(c, modifiers));
|
||||
continue; // for (str)
|
||||
}
|
||||
}
|
||||
@@ -1436,7 +1436,7 @@ int ExpandMappings(char *pat, regmatch_T *regmatch, int *numMatches, char ***mat
|
||||
bool check_abbr(int c, char *ptr, int col, int mincol)
|
||||
{
|
||||
int scol; // starting column of the abbr.
|
||||
char_u tb[MB_MAXBYTES + 4];
|
||||
uint8_t tb[MB_MAXBYTES + 4];
|
||||
mapblock_T *mp;
|
||||
mapblock_T *mp2;
|
||||
int clen = 0; // length in characters
|
||||
@@ -1535,8 +1535,8 @@ bool check_abbr(int c, char *ptr, int col, int mincol)
|
||||
// special key code, split up
|
||||
if (IS_SPECIAL(c) || c == K_SPECIAL) {
|
||||
tb[j++] = K_SPECIAL;
|
||||
tb[j++] = (char_u)K_SECOND(c);
|
||||
tb[j++] = (char_u)K_THIRD(c);
|
||||
tb[j++] = (uint8_t)K_SECOND(c);
|
||||
tb[j++] = (uint8_t)K_THIRD(c);
|
||||
} else {
|
||||
if (c < ABBR_OFF && (c < ' ' || c > '~')) {
|
||||
tb[j++] = Ctrl_V; // special char needs CTRL-V
|
||||
@@ -1918,7 +1918,7 @@ int put_escstr(FILE *fd, char *strstart, int what)
|
||||
str += 2;
|
||||
}
|
||||
if (IS_SPECIAL(c) || modifiers) { // special key
|
||||
if (fputs((char *)get_special_key_name(c, modifiers), fd) < 0) {
|
||||
if (fputs(get_special_key_name(c, modifiers), fd) < 0) {
|
||||
return FAIL;
|
||||
}
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user