aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-09-20 09:18:59 +0200
committerGitHub <noreply@github.com>2023-09-20 09:18:59 +0200
commitc6cc56d69cf294e8b91602a2f34a261325691286 (patch)
tree9bf4c66aa01406f25fbe22677baeee405b34c80c /src
parentb2265bb72c268c95180dc92c129be11fd87f995d (diff)
parentab92575753874f9dee73e722b6fddd8dd49e2f13 (diff)
downloadrneovim-c6cc56d69cf294e8b91602a2f34a261325691286.tar.gz
rneovim-c6cc56d69cf294e8b91602a2f34a261325691286.tar.bz2
rneovim-c6cc56d69cf294e8b91602a2f34a261325691286.zip
Merge pull request #25155 from glepnir/fix_winhl
fix(highlight): winhl receive wrong argument
Diffstat (limited to 'src')
-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 803c5173ea..c34999ed32 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -1915,6 +1915,9 @@ bool parse_winhl_opt(win_T *wp)
char *commap = xstrchrnul(hi, ',');
size_t len = (size_t)(commap - hi);
int hl_id = len ? syn_check_group(hi, len) : -1;
+ if (hl_id == 0) {
+ return false;
+ }
int hl_id_link = nlen ? syn_check_group(p, nlen) : 0;
HlAttrs attrs = HLATTRS_INIT;