-*options.txt* For Vim version 9.2. Last change: 2026 May 10
+*options.txt* For Vim version 9.2. Last change: 2026 May 17
VIM REFERENCE MANUAL by Bram Moolenaar
[:PmenuKind,]:PmenuKindSel,
{:PmenuExtra,}:PmenuExtraSel,
x:PmenuSbar,X:PmenuThumb,j:PmenuBorder,
- H:PmenuShadow,*:TabLine,
+ H:PmenuShadow,p:Popup,J:PopupBorder,
+ Q:PopupTitle,*:TabLine,
#:TabLineSel,_:TabLineFill,!:CursorColumn,
.:CursorLine,o:ColorColumn,q:QuickFixLine,
z:StatusLineTerm,Z:StatusLineTermNC,
|hl-PmenuMatchSel| < popup menu matched text in selected line
|hl-PmenuBorder| j popup menu border characters
|hl-PmenuShadow| H popup menu shadow
+ |hl-Popup| p popup window body
+ |hl-PopupBorder| J popup window border characters
+ |hl-PopupTitle| Q popup window title
|hl-PreInsert| I text inserted when "preinsert" is in 'completeopt'
|hl-Normal| ( Window color (supersedes 'wincolor' option)
-*popup.txt* For Vim version 9.2. Last change: 2026 May 10
+*popup.txt* For Vim version 9.2. Last change: 2026 May 17
VIM REFERENCE MANUAL by Bram Moolenaar
The text in the popup window can be colored with |text-properties|. It is
also possible to use syntax highlighting.
-The default color used is "Pmenu". If you prefer something else use the
-"highlight" argument or the 'wincolor' option, e.g.: >
+The default colors are taken from |hl-Popup| (body), |hl-PopupBorder|
+(border) and |hl-PopupTitle| (title), which all link to |hl-Pmenu| by
+default for backward compatibility. Override them to give general popup
+windows a different look than the popup completion menu, or use the
+"highlight" argument or the 'wincolor' option for a per-popup override: >
hi MyPopupColor ctermbg=lightblue guibg=lightblue
call setwinvar(winid, '&wincolor', 'MyPopupColor')
border one line of padding is added to put the title
on. You might want to add one or more spaces at the
start and end as padding.
+ The title uses |hl-PopupTitle| by default; if
+ "borderhighlight" is set the top border highlight is
+ used instead, and if "highlight"/'wincolor' is set
+ that is used.
wrap TRUE to make the lines wrap (default TRUE).
drag TRUE to allow the popup to be dragged with the mouse
by grabbing at the border. Has no effect if the
the highlight for the top/right/bottom/left border.
Example: ['TopColor', 'RightColor', 'BottomColor,
'LeftColor']
+ When not given and "highlight"/'wincolor' is also not
+ set, |hl-PopupBorder| is used.
borderchars List with characters, defining the character to use
for the top/right/bottom/left border. Optionally
followed by the character to use for the
-*syntax.txt* For Vim version 9.2. Last change: 2026 May 15
+*syntax.txt* For Vim version 9.2. Last change: 2026 May 17
VIM REFERENCE MANUAL by Bram Moolenaar
ComplMatchIns Matched text of the currently inserted completion.
*hl-PreInsert*
PreInsert Text inserted when "preinsert" is in 'completeopt'.
+ *hl-Popup*
+Popup Popup window body, used when neither the popup's 'wincolor'
+ nor explicit "highlight" argument is set. Linked to |hl-Pmenu|
+ by default.
+ *hl-PopupBorder*
+PopupBorder Popup window border characters, used when "borderhighlight" is
+ not set and the popup's 'wincolor' is also not set.
+ Linked to |hl-Pmenu| by default.
+ *hl-PopupTitle*
+PopupTitle Popup window title, used when "borderhighlight" is not set and
+ the popup's 'wincolor' is also not set. Linked to
+ |hl-Pmenu| by default.
*hl-PopupSelected*
PopupSelected Popup window created with |popup_menu()|. Linked to
|hl-PmenuSel| by default.
hl-PmenuSel syntax.txt /*hl-PmenuSel*
hl-PmenuShadow syntax.txt /*hl-PmenuShadow*
hl-PmenuThumb syntax.txt /*hl-PmenuThumb*
+hl-Popup syntax.txt /*hl-Popup*
+hl-PopupBorder syntax.txt /*hl-PopupBorder*
hl-PopupNotification syntax.txt /*hl-PopupNotification*
hl-PopupSelected syntax.txt /*hl-PopupSelected*
+hl-PopupTitle syntax.txt /*hl-PopupTitle*
hl-PreInsert syntax.txt /*hl-PreInsert*
hl-Question syntax.txt /*hl-Question*
hl-QuickFixLine syntax.txt /*hl-QuickFixLine*
-*version9.txt* For Vim version 9.2. Last change: 2026 May 11
+*version9.txt* For Vim version 9.2. Last change: 2026 May 17
VIM REFERENCE MANUAL by Bram Moolenaar
|hl-PmenuMatchSel| Popup menu: highlighting of matched text in selected
line
|hl-PmenuShadow| Popup menu: highlighting of the popup shadow
+|hl-Popup| Popup window: body, default link |hl-Pmenu|
+|hl-PopupBorder| Popup window: border characters, default link |hl-Pmenu|
+|hl-PopupTitle| Popup window: title, default link |hl-Pmenu|
|hl-PreInsert| highlighting for completion preinserted text
|hl-TabPanel| |tabpanel|: not active tab page label
|hl-TabPanelFill| |tabpanel|: filler space
Highlighting: ~
|hl-VertSplitNC| Column separator of non-current window.
+|hl-Popup| Popup window body.
+|hl-PopupBorder| Popup window border.
+|hl-PopupTitle| Popup window title.
==============================================================================
PATCHES *patches-9.3* *bug-fixes-9.3*
" Language: Vim script
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2026 May 10
+" Last Change: 2026 May 17
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
" Default highlighting groups {{{2
" GEN_SYN_VIM: vimHLGroup, START_STR='syn keyword vimHLGroup contained', END_STR=''
-syn keyword vimHLGroup contained ErrorMsg IncSearch ModeMsg NonText StatusLine StatusLineNC EndOfBuffer VertSplit VertSplitNC VisualNOS DiffText DiffTextAdd PmenuSbar TabLineSel TabLineFill TabPanel TabPanelSel TabPanelFill Cursor lCursor TitleBar TitleBarNC QuickFixLine CursorLineSign CursorLineFold CurSearch PmenuKind PmenuKindSel PmenuMatch PmenuMatchSel PmenuExtra PmenuExtraSel PmenuBorder PopupSelected MessageWindow PopupNotification PreInsert Normal Directory LineNr CursorLineNr MoreMsg Question Search SpellBad SpellCap SpellRare SpellLocal PmenuThumb PmenuShadow Pmenu PmenuSel SpecialKey Title WarningMsg WildMenu Folded FoldColumn SignColumn Visual DiffAdd DiffChange DiffDelete TabLine CursorColumn CursorLine ColorColumn MatchParen StatusLineTerm StatusLineTermNC
-syn keyword vimHLGroup contained ToolbarLine ToolbarButton TitleBar TitleBarNC Menu Tooltip Scrollbar CursorIM ComplMatchIns LineNrAbove LineNrBelow MsgArea Terminal User1 User2 User3 User4 User5 User6 User7 User8 User9
+syn keyword vimHLGroup contained ErrorMsg IncSearch ModeMsg NonText StatusLine StatusLineNC EndOfBuffer VertSplit VertSplitNC VisualNOS DiffText DiffTextAdd PmenuSbar TabLineSel TabLineFill TabPanel TabPanelSel TabPanelFill Cursor lCursor TitleBar TitleBarNC QuickFixLine CursorLineSign CursorLineFold CurSearch PmenuKind PmenuKindSel PmenuMatch PmenuMatchSel PmenuExtra PmenuExtraSel PmenuBorder PopupSelected Popup PopupBorder PopupTitle MessageWindow PopupNotification PreInsert Normal Directory LineNr CursorLineNr MoreMsg Question Search SpellBad SpellCap SpellRare SpellLocal PmenuThumb PmenuShadow Pmenu PmenuSel SpecialKey Title WarningMsg WildMenu Folded FoldColumn SignColumn Visual DiffAdd DiffChange DiffDelete TabLine CursorColumn CursorLine ColorColumn MatchParen
+syn keyword vimHLGroup contained StatusLineTerm StatusLineTermNC ToolbarLine ToolbarButton TitleBar TitleBarNC Menu Tooltip Scrollbar CursorIM ComplMatchIns LineNrAbove LineNrBelow MsgArea Terminal User1 User2 User3 User4 User5 User6 User7 User8 User9
syn match vimHLGroup contained "\<Conceal\>"
syn case match
"default link PmenuExtraSel PmenuSel",
"default link PmenuBorder Pmenu",
"default link PopupSelected PmenuSel",
+ "default link Popup Pmenu",
+ "default link PopupBorder Pmenu",
+ "default link PopupTitle Pmenu",
"default link MessageWindow WarningMsg",
"default link PopupNotification WarningMsg",
"default link PreInsert Added",
# define ISP_LATIN1 (char_u *)"@,161-255"
#endif
-#define HIGHLIGHT_INIT "8:SpecialKey,~:EndOfBuffer,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,y:CurSearch,m:MoreMsg,M:ModeMsg,n:LineNr,a:LineNrAbove,b:LineNrBelow,N:CursorLineNr,G:CursorLineSign,O:CursorLineFold,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,|:VertSplitNC,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,E:DiffTextAdd,>:SignColumn,-:Conceal,B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,k:PmenuMatch,<:PmenuMatchSel,[:PmenuKind,]:PmenuKindSel,{:PmenuExtra,}:PmenuExtraSel,x:PmenuSbar,X:PmenuThumb,j:PmenuBorder,H:PmenuShadow,*:TabLine,#:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine,o:ColorColumn,q:QuickFixLine,z:StatusLineTerm,Z:StatusLineTermNC,g:MsgArea,h:ComplMatchIns,%:TabPanel,^:TabPanelSel,&:TabPanelFill,I:PreInsert"
+#define HIGHLIGHT_INIT "8:SpecialKey,~:EndOfBuffer,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,y:CurSearch,m:MoreMsg,M:ModeMsg,n:LineNr,a:LineNrAbove,b:LineNrBelow,N:CursorLineNr,G:CursorLineSign,O:CursorLineFold,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,|:VertSplitNC,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,E:DiffTextAdd,>:SignColumn,-:Conceal,B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,k:PmenuMatch,<:PmenuMatchSel,[:PmenuKind,]:PmenuKindSel,{:PmenuExtra,}:PmenuExtraSel,x:PmenuSbar,X:PmenuThumb,j:PmenuBorder,H:PmenuShadow,p:Popup,J:PopupBorder,Q:PopupTitle,*:TabLine,#:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine,o:ColorColumn,q:QuickFixLine,z:StatusLineTerm,Z:StatusLineTermNC,g:MsgArea,h:ComplMatchIns,%:TabPanel,^:TabPanelSel,&:TabPanelFill,I:PreInsert"
// Default python version for pyx* commands
#if defined(FEAT_PYTHON) && defined(FEAT_PYTHON3)
for (i = 0; i < 4; ++i)
{
- border_attr[i] = popup_attr;
if (wp->w_border_highlight[i] != NULL)
border_attr[i] = syn_name2attr(wp->w_border_highlight[i]);
+ else if (wp->w_hlfwin_id != 0
+ || (wp->w_popup_flags & POPF_INFO))
+ border_attr[i] = popup_attr;
+ else
+ border_attr[i] = HL_ATTR(HLF_POPB);
// Apply blend to border attributes for popup with opacitys
if ((wp->w_popup_flags & POPF_OPACITY) && wp->w_popup_blend > 0)
title_wincol = wp->w_wincol + 1;
if (wp->w_popup_title != NULL)
{
+ int title_attr;
+
+ if (wp->w_popup_border[0] > 0 && wp->w_border_highlight[0] != NULL)
+ title_attr = border_attr[0];
+ else if (wp->w_hlfwin_id != 0
+ || (wp->w_popup_flags & POPF_INFO))
+ title_attr = popup_attr;
+ else
+ title_attr = HL_ATTR(HLF_POPT);
+
title_len = vim_strsize(wp->w_popup_title);
// truncate the title if too long
trunc_string(wp->w_popup_title, title_text,
total_width - 2, title_byte_len + 1);
screen_puts(title_text, wp->w_winrow, title_wincol,
- wp->w_popup_border[0] > 0
- ? border_attr[0] : popup_attr);
+ title_attr);
vim_free(title_text);
}
}
else
screen_puts(wp->w_popup_title, wp->w_winrow, title_wincol,
- wp->w_popup_border[0] > 0 ? border_attr[0] : popup_attr);
+ title_attr);
}
wincol = wp->w_wincol - wp->w_popup_leftoff + wp->w_popup_leftclip;
if (wp->w_popup_flags & POPF_INFO)
win_attr = HL_ATTR(HLF_PSI); // PmenuSel
else
- win_attr = HL_ATTR(HLF_PNI); // Pmenu
+ win_attr = HL_ATTR(HLF_POP); // Popup
}
#endif
" Test for 'highlight' option
func Test_highlight_opt()
let save_hl = &highlight
+ " "K" is intentionally an unused 'highlight' flag character; if you add a
+ " new HLF_ entry, pick a different letter or update this test.
call assert_fails('set highlight=K:b', 'E474:')
set highlight=f\ r
call assert_equal('f r', &highlight)
hi B ctermbg=blue ctermfg=white
redraw! # Remove intro message
- win_execute(g:id, "set filetype=c whl=Pmenu:A,cType:B")
+ win_execute(g:id, "set filetype=c whl=Popup:A,PopupBorder:A,cType:B")
END
call writefile(lines, 'Xtest_winhighlight_popupwin', 'D')
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 493,
/**/
492,
/**/
, HLF_PST // popup menu scrollbar thumb
, HLF_PMB // popup menu border
, HLF_PMS // popup menu shadow
+ , HLF_POP // popup window body
+ , HLF_POPB // popup window border
+ , HLF_POPT // popup window title
, HLF_TP // tabpage line
, HLF_TPS // tabpage line selected
, HLF_TPF // tabpage line filler
'w', 'W', 'f', 'F', 'A', 'C', 'D', 'T', 'E', '-', '>', \
'B', 'P', 'R', 'L', \
'+', '=', 'k', '<','[', ']', '{', '}', 'x', 'X', 'j', 'H', \
+ 'p', 'J', 'Q', \
'*', '#', '_', '!', '.', 'o', 'q', \
'z', 'Z', 'g', \
'%', '^', '&', 'I', '('}