From 8c532a9ea8a0bb2ee93d772c9589d1a84afeb541 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 22 Oct 2024 16:10:15 +0800 Subject: fix(options): fix 'winhl' still accepting invalid value (#30896) --- src/nvim/option.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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; -- cgit