patch 9.1.1123: popup hi groups not falling back to defaults
Problem: Highlight groups PopupSelected/PopupNotification/
MessageWindow are supposed to fall back to default highlight
groups if they are not defined. However, once a colorscheme
has defined them, switching to another colorscheme that
doesn't do so will leave behind a cleared colorscheme, which
causes the fallback to fail.
Solution: Set up default links to the relevant fallback highlight
groups, which makes sure a `:hi clear` command will reset the
state properly (Yee Cheng Chin).
closes: #16676
Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/highlight.c b/src/highlight.c
index 1a4c76d..8c1ad80 100644
--- a/src/highlight.c
+++ b/src/highlight.c
@@ -262,6 +262,9 @@
"default link PmenuMatchSel PmenuSel",
"default link PmenuExtra Pmenu",
"default link PmenuExtraSel PmenuSel",
+ "default link PopupSelected PmenuSel",
+ "default link MessageWindow WarningMsg",
+ "default link PopupNotification WarningMsg",
CENT("Normal cterm=NONE", "Normal gui=NONE"),
NULL
};