forked from aniani/vim
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>
This commit is contained in:
committed by
Christian Brabandt
parent
911742a975
commit
e700ddeea4
@@ -1,4 +1,4 @@
|
||||
*popup.txt* For Vim version 9.1. Last change: 2025 Jan 08
|
||||
*popup.txt* For Vim version 9.1. Last change: 2025 Feb 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -504,7 +504,7 @@ popup_menu({what}, {options}) *popup_menu()*
|
||||
\ mapping: 0,
|
||||
\ })
|
||||
< The current line is highlighted with a match using
|
||||
"PopupSelected", or "PmenuSel" if that is not defined.
|
||||
|hl-PopupSelected| which is linked to "PmenuSel" by default.
|
||||
|
||||
Use {options} to change the properties. Should at least set
|
||||
"callback" to a function that handles the selected item.
|
||||
@@ -559,7 +559,7 @@ popup_notification({what}, {options}) *popup_notification()*
|
||||
\ close: 'click',
|
||||
\ padding: [0,1,0,1],
|
||||
\ })
|
||||
< The PopupNotification highlight group is used instead of
|
||||
< The |hl-PopupNotification| highlight group is used instead of
|
||||
WarningMsg if it is defined.
|
||||
|
||||
Without the |+timers| feature the popup will not disappear
|
||||
|
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 9.1. Last change: 2025 Jan 20
|
||||
*syntax.txt* For Vim version 9.1. Last change: 2025 Feb 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -5831,8 +5831,8 @@ CursorLineSign Like SignColumn when 'cursorline' is set for the cursor line.
|
||||
MatchParen Character under the cursor or just before it, if it
|
||||
is a paired bracket, and its match. |pi_paren.txt|
|
||||
*hl-MessageWindow*
|
||||
MessageWindow Messages popup window used by `:echowindow`. If not defined
|
||||
|hl-WarningMsg| is used.
|
||||
MessageWindow Messages popup window used by `:echowindow`. Linked to
|
||||
|hl-WarningMsg| by default.
|
||||
*hl-ModeMsg*
|
||||
ModeMsg 'showmode' message (e.g., "-- INSERT --").
|
||||
*hl-MsgArea*
|
||||
@@ -5872,10 +5872,13 @@ PmenuMatchSel Popup menu: Matched text in selected item. Applied in
|
||||
combination with |hl-PmenuSel|.
|
||||
*hl-ComplMatchIns*
|
||||
ComplMatchIns Matched text of the currently inserted completion.
|
||||
*hl-PopupSelected*
|
||||
PopupSelected Popup window created with |popup_menu()|. Linked to
|
||||
|hl-PmenuSel| by default.
|
||||
*hl-PopupNotification*
|
||||
PopupNotification
|
||||
Popup window created with |popup_notification()|. If not
|
||||
defined |hl-WarningMsg| is used.
|
||||
Popup window created with |popup_notification()|. Linked to
|
||||
|hl-WarningMsg| by default.
|
||||
*hl-Question*
|
||||
Question |hit-enter| prompt and yes/no questions.
|
||||
*hl-QuickFixLine*
|
||||
|
@@ -8191,6 +8191,7 @@ hl-PmenuSbar syntax.txt /*hl-PmenuSbar*
|
||||
hl-PmenuSel syntax.txt /*hl-PmenuSel*
|
||||
hl-PmenuThumb syntax.txt /*hl-PmenuThumb*
|
||||
hl-PopupNotification syntax.txt /*hl-PopupNotification*
|
||||
hl-PopupSelected syntax.txt /*hl-PopupSelected*
|
||||
hl-Question syntax.txt /*hl-Question*
|
||||
hl-QuickFixLine syntax.txt /*hl-QuickFixLine*
|
||||
hl-Scrollbar syntax.txt /*hl-Scrollbar*
|
||||
|
Reference in New Issue
Block a user