aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-10-22 16:10:15 +0800
committerGitHub <noreply@github.com>2024-10-22 08:10:15 +0000
commit8c532a9ea8a0bb2ee93d772c9589d1a84afeb541 (patch)
tree0bd0d98de03fbf72426b64b81d59aaa7c667a1ce /src/nvim/option.c
parent772614f9cc44bfd4914d27698509077e762873c0 (diff)
downloadrneovim-8c532a9ea8a0bb2ee93d772c9589d1a84afeb541.tar.gz
rneovim-8c532a9ea8a0bb2ee93d772c9589d1a84afeb541.tar.bz2
rneovim-8c532a9ea8a0bb2ee93d772c9589d1a84afeb541.zip
fix(options): fix 'winhl' still accepting invalid value (#30896)
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r--src/nvim/option.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 2e6d317778..89753f7cf8 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -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;