aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/keymap.c')
-rw-r--r--src/nvim/keymap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/keymap.c b/src/nvim/keymap.c
index b724d82f7c..abf016b832 100644
--- a/src/nvim/keymap.c
+++ b/src/nvim/keymap.c
@@ -477,7 +477,7 @@ char_u *get_special_key_name(int c, int modifiers)
* extract modifiers.
*/
if (c > 0
- && (*mb_char2len)(c) == 1) {
+ && utf_char2len(c) == 1) {
if (table_idx < 0
&& (!vim_isprintc(c) || (c & 0x7f) == ' ')
&& (c & 0x80)) {
@@ -647,7 +647,7 @@ int find_special_key(const char_u **srcp, const size_t src_len, int *const modp,
} else if (end - bp > 4 && STRNICMP(bp, "char-", 5) == 0) {
vim_str2nr(bp + 5, NULL, &l, STR2NR_ALL, NULL, NULL, 0, true);
if (l == 0) {
- EMSG(_(e_invarg));
+ emsg(_(e_invarg));
return 0;
}
bp += l + 5;
@@ -677,7 +677,7 @@ int find_special_key(const char_u **srcp, const size_t src_len, int *const modp,
// <Char-123> or <Char-033> or <Char-0x33>
vim_str2nr(last_dash + 6, NULL, &l, STR2NR_ALL, NULL, &n, 0, true);
if (l == 0) {
- EMSG(_(e_invarg));
+ emsg(_(e_invarg));
return 0;
}
key = (int)n;
@@ -689,10 +689,10 @@ int find_special_key(const char_u **srcp, const size_t src_len, int *const modp,
// Special case for a double-quoted string
off = l = 2;
} else {
- l = mb_ptr2len(last_dash + 1);
+ l = utfc_ptr2len(last_dash + 1);
}
if (modifiers != 0 && last_dash[l + 1] == '>') {
- key = PTR2CHAR(last_dash + off);
+ key = utf_ptr2char(last_dash + off);
} else {
key = get_special_key_code(last_dash + off);
if (!keep_x_key) {
@@ -891,7 +891,7 @@ char_u *replace_termcodes(const char_u *from, const size_t from_len, char_u **bu
// (room: 5 * 6 = 30 bytes; needed: 3 + <nr> + 1 <= 14)
if (end - src >= 4 && STRNICMP(src, "<SID>", 5) == 0) {
if (current_sctx.sc_sid <= 0) {
- EMSG(_(e_usingsid));
+ emsg(_(e_usingsid));
} else {
src += 5;
result[dlen++] = K_SPECIAL;