aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/keymap.c
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-11-30 02:01:49 +0300
committerZyX <kp-pav@yandex.ru>2017-11-30 02:01:49 +0300
commitde45ec0146486c49719ff6f6dcceb4914b471c7a (patch)
treeefeca45f58023f8259511276815243539bffa1a1 /src/nvim/keymap.c
parent36a4f3a259ffa282129b18358cce4130397077c5 (diff)
downloadrneovim-de45ec0146486c49719ff6f6dcceb4914b471c7a.tar.gz
rneovim-de45ec0146486c49719ff6f6dcceb4914b471c7a.tar.bz2
rneovim-de45ec0146486c49719ff6f6dcceb4914b471c7a.zip
keymap: Do not use vim_isIDc in keymap.c
Note: there are three changes to ascii_isident. Reverting first two (in find_special_key and first in get_special_key_code) normally fails the new test with empty &isident, but reverting the third does not. Hence adding `>` to &isident. Ref vim/vim#2389.
Diffstat (limited to 'src/nvim/keymap.c')
-rw-r--r--src/nvim/keymap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/keymap.c b/src/nvim/keymap.c
index aca21c20a5..0eb5a41b1e 100644
--- a/src/nvim/keymap.c
+++ b/src/nvim/keymap.c
@@ -567,7 +567,7 @@ int find_special_key(const char_u **srcp, const size_t src_len, int *const modp,
// Find end of modifier list
last_dash = src;
- for (bp = src + 1; bp <= end && (*bp == '-' || vim_isIDc(*bp)); bp++) {
+ for (bp = src + 1; bp <= end && (*bp == '-' || ascii_isident(*bp)); bp++) {
if (*bp == '-') {
last_dash = bp;
if (bp + 1 <= end) {
@@ -721,12 +721,12 @@ int get_special_key_code(const char_u *name)
for (int i = 0; key_names_table[i].name != NULL; i++) {
const char *const table_name = key_names_table[i].name;
int j;
- for (j = 0; vim_isIDc(name[j]) && table_name[j] != NUL; j++) {
+ for (j = 0; ascii_isident(name[j]) && table_name[j] != NUL; j++) {
if (TOLOWER_ASC(table_name[j]) != TOLOWER_ASC(name[j])) {
break;
}
}
- if (!vim_isIDc(name[j]) && table_name[j] == NUL) {
+ if (!ascii_isident(name[j]) && table_name[j] == NUL) {
return key_names_table[i].key;
}
}