From e3d1f4c982bd0fe05496448d7868268c75ff7bfb Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 6 Apr 2021 20:21:59 +0200 Subject: 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) --- src/charset.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/charset.c') diff --git a/src/charset.c b/src/charset.c index db0c146f8..10aa2e8e5 100644 --- a/src/charset.c +++ b/src/charset.c @@ -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. -- cgit v1.2.1