mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 07:28:34 +00:00
Remove has_mbytes local to lines changed in parent commit
This commit is contained in:
@@ -465,7 +465,7 @@ char_u *get_special_key_name(int c, int modifiers)
|
||||
}
|
||||
/* Not a special key, only modifiers, output directly */
|
||||
else {
|
||||
if (has_mbyte && (*mb_char2len)(c) > 1)
|
||||
if (utf_char2len(c) > 1)
|
||||
idx += utf_char2bytes(c, string + idx);
|
||||
else if (vim_isprintc(c))
|
||||
string[idx++] = (char_u)c;
|
||||
@@ -524,14 +524,12 @@ unsigned int trans_special(const char_u **srcp, const size_t src_len,
|
||||
dst[dlen++] = K_SPECIAL;
|
||||
dst[dlen++] = (char_u)KEY2TERMCAP0(key);
|
||||
dst[dlen++] = KEY2TERMCAP1(key);
|
||||
} else if (has_mbyte && !keycode) {
|
||||
} else if (!keycode) {
|
||||
dlen += (unsigned int)utf_char2bytes(key, dst + dlen);
|
||||
} else if (keycode) {
|
||||
} else {
|
||||
char_u *after = add_char2buf(key, dst + dlen);
|
||||
assert(after >= dst && (uintmax_t)(after - dst) <= UINT_MAX);
|
||||
dlen = (unsigned int)(after - dst);
|
||||
} else {
|
||||
dst[dlen++] = (char_u)key;
|
||||
}
|
||||
|
||||
return dlen;
|
||||
|
Reference in New Issue
Block a user