summaryrefslogtreecommitdiffstats
path: root/src/charset.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-04-06 20:21:59 +0200
committerBram Moolenaar <Bram@vim.org>2021-04-06 20:21:59 +0200
commite3d1f4c982bd0fe05496448d7868268c75ff7bfb (patch)
treee272320895bfe5bc0c6d175ddcd213370d354ae0 /src/charset.c
parente9b8b78e046b40b877c999432c4698edb3413d5d (diff)
patch 8.2.2728: special key names don't work if 'isident' is clearedv8.2.2728
Problem: Special key names don't work if 'isident' is cleared. Solution: Add vim_isNormalIDc() and use it for special key names. (closes #2389)
Diffstat (limited to 'src/charset.c')
-rw-r--r--src/charset.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/charset.c b/src/charset.c
index db0c146f88..10aa2e8e52 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -835,6 +835,16 @@ vim_isIDc(int c)
}
/*
+ * 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.
* For multi-byte characters mb_get_class() is used (builtin rules).