fix(options): fix 'winhl' still accepting invalid value (#30896)

This commit is contained in:
zeertzjq
2024-10-22 16:10:15 +08:00
committed by GitHub
parent 772614f9cc
commit 8c532a9ea8
3 changed files with 31 additions and 15 deletions

View File

@@ -1853,6 +1853,9 @@ bool parse_winhl_opt(win_T *wp)
return false;
}
int hl_id_link = nlen ? syn_check_group(p, nlen) : 0;
if (hl_id_link == 0) {
return false;
}
HlAttrs attrs = HLATTRS_INIT;
attrs.rgb_ae_attr |= HL_GLOBAL;