patch 9.1.1006: PmenuMatch completion highlight can be combined
Problem: PmenuMatch completion highlight can be combined
Solution: Combine highlight groups PmenuMatch with Pmenu and
PmenuMatchSel with PmenuSel (glepnir)
fixes: #15563
closes: #16408
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/popupmenu.c b/src/popupmenu.c
index ea2edca..14cc69a 100644
--- a/src/popupmenu.c
+++ b/src/popupmenu.c
@@ -450,13 +450,18 @@
if (char_pos == ((int_u *)ga->ga_data)[i])
{
new_attr = highlight_attr[is_select ? HLF_PMSI : HLF_PMNI];
+ new_attr = hl_combine_attr(highlight_attr[hlf], new_attr);
break;
}
}
}
else if (matched_start && ptr < text + leader_len)
+ {
new_attr = highlight_attr[is_select ? HLF_PMSI : HLF_PMNI];
+ new_attr = hl_combine_attr(highlight_attr[hlf], new_attr);
+ }
+ new_attr = hl_combine_attr(highlight_attr[HLF_PNI], new_attr);
if (user_hlattr > 0)
new_attr = hl_combine_attr(new_attr, user_hlattr);