close show close button: "on" (default) or "off"
height maximum height of the popup
highlight popup highlight group (default: PmenuSel)
+ opacity opacity percentage 0-100 (default 100, fully
+ opaque). When less than 100, content beneath
+ the popup shows through.
resize show resize handle: "on" (default) or "off"
shadow "off" (default) or "on" using |hl-PmenuShadow|
width maximum width of the popup
Example: >
:set completepopup=height:10,border:single,highlight:InfoPopup
:set completepopup=width:60,border:custom:─;│;─;│;┌;┐;┘;└
+ :set completepopup=border:round,opacity:80
<
When "align" is set to "item", the popup is positioned near the
selected item and moves as the selection changes.
- Support for transparency, see |popup-opacity|.
- 'previewpopup' supports the same values as 'completepopup' (except for
"align").
+- Support "opacity" setting for 'completepopup' option.
Diff mode ~
---------
-*windows.txt* For Vim version 9.2. Last change: 2026 Mar 01
+*windows.txt* For Vim version 9.2. Last change: 2026 May 01
VIM REFERENCE MANUAL by Bram Moolenaar
the value is "on", it must be set after border.
height maximum height of the popup
highlight highlight group of the popup (default is Pmenu)
+ opacity opacity percentage 0-100 (default 100, fully opaque).
+ When less than 100, content beneath the popup shows
+ through.
resize show resize handle: "on" (default) or "off"
shadow "off" (default) or "on" using |hl-PmenuShadow|
width maximum width of the popup
:set previewpopup=height:10,width:60
:set previewpopup=border:single,borderhilight:PmenuBorder
:set previewpopup=border:custom:─;│;─;│;┌;┐;┘;└
+ :set previewpopup=border:round,opacity:80
A few peculiarities:
- If the file is in a buffer already, it will be re-used. This will allow for
#ifdef FEAT_PROP_POPUP
// Note: Keep this in sync with parse_popup_option()
static char *(p_popup_cpp_option_values[]) = {"align:", "border:",
- "borderhighlight:", "close:", "height:", "highlight:", "resize:",
- "shadow:", "width:", NULL};
+ "borderhighlight:", "close:", "height:", "highlight:", "opacity:",
+ "resize:", "shadow:", "width:", NULL};
static char *(p_popup_pvp_option_values[]) = {"border:",
- "borderhighlight:", "close:", "height:", "highlight:", "resize:",
- "shadow:", "width:", NULL};
+ "borderhighlight:", "close:", "height:", "highlight:", "opacity:",
+ "resize:", "shadow:", "width:", NULL};
static char *(p_popup_option_on_off_values[]) = {"on", "off", NULL};
static char *(p_popup_cpp_border_values[]) = {"single", "double", "round",
"ascii", "on", "off", "custom:", NULL};
if (wp != NULL && menu)
wp->w_popup_flags |= POPF_INFO_MENU;
}
+ else if (STRNCMP(s, "opacity:", 8) == 0)
+ {
+ if (dig != p || x < 0 || x > 100)
+ return FAIL;
+ if (wp != NULL)
+ {
+ if (x < 100)
+ wp->w_popup_flags |= POPF_OPACITY;
+ else
+ wp->w_popup_flags &= ~POPF_OPACITY;
+ wp->w_popup_blend = 100 - x;
+ }
+ }
else
return FAIL;
}
call feedkeys(":set completepopup=height:10,align:\<Tab>\<C-B>\"\<CR>", 'xt')
call assert_equal('"set completepopup=height:10,align:item', @:)
call assert_equal([], getcompletion('set completepopup=bogusname:', 'cmdline'))
+
+ " opacity: numeric, 0..100 only
+ call assert_true(index(getcompletion('set completepopup=', 'cmdline'),
+ \ 'opacity:') >= 0)
+ call assert_true(index(getcompletion('set previewpopup=', 'cmdline'),
+ \ 'opacity:') >= 0)
+ set completepopup=border:on,opacity:0
+ set completepopup=border:on,opacity:50
+ set completepopup=border:on,opacity:100
+ call assert_fails('set completepopup=opacity:101', 'E474:')
+ call assert_fails('set completepopup=opacity:abc', 'E474:')
+ call assert_fails('set completepopup=opacity:-10', 'E474:')
+ set previewpopup=opacity:30
+ call assert_fails('set previewpopup=opacity:200', 'E474:')
+ call assert_fails('set previewpopup=opacity:-10', 'E474:')
+
set previewpopup& completepopup&
" diffopt: special handling of algorithm:<alg_list> and inline:<inline_type>
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 428,
/**/
427,
/**/