vim-patch:9.0.1767: '.-' no allowed in highlight group names (#24814)

Problem:  '.-' no allowed in highlight group names
Solution: Allow dot and hyphen characters in highlight group names

Allow dots and hyphens in group names. There does not seem
to be any reason for these to be disallowed.

closes: vim/vim#12807

d4376dc3eb

Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
This commit is contained in:
zeertzjq
2023-08-21 10:25:41 +08:00
committed by GitHub
parent eaad2f7806
commit 91d8f2ac53
3 changed files with 4 additions and 5 deletions

View File

@@ -1936,7 +1936,7 @@ int syn_check_group(const char *name, size_t len)
/// @see syn_check_group
static int syn_add_group(const char *name, size_t len)
{
// Check that the name is ASCII letters, digits and underscore.
// Check that the name is valid (ASCII letters, digits, '_', '.', '@', '-').
for (size_t i = 0; i < len; i++) {
int c = (uint8_t)name[i];
if (!vim_isprintc(c)) {