Remove has_mbytes local to lines changed in parent commit

This commit is contained in:
ZviRackover
2018-09-02 01:36:18 +03:00
parent cbdbc4f63d
commit ac13e65ae0
11 changed files with 51 additions and 128 deletions

View File

@@ -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;