1
0
forked from aniani/vim

patch 8.2.2728: special key names don't work if 'isident' is cleared

Problem:    Special key names don't work if 'isident' is cleared.
Solution:   Add vim_isNormalIDc() and use it for special key names.
            (closes #2389)
This commit is contained in:
Bram Moolenaar
2021-04-06 20:21:59 +02:00
parent e9b8b78e04
commit e3d1f4c982
5 changed files with 20 additions and 4 deletions

View File

@@ -834,6 +834,16 @@ vim_isIDc(int c)
return (c > 0 && c < 0x100 && (g_chartab[c] & CT_ID_CHAR));
}
/*
* Like vim_isIDc() but not using the 'isident' option: letters, numbers and
* underscore.
*/
int
vim_isNormalIDc(int c)
{
return ASCII_ISALNUM(c) || c == '_';
}
/*
* return TRUE if 'c' is a keyword character: Letters and characters from
* 'iskeyword' option for the current buffer.