patch 9.1.1856: cannot style popup window (border, shadow, etc)
Problem: cannot style popup window (border, shadow, etc)
Solution: Extend the 'completepopup' option with additional properties
(Girish Palya)
This patch extends the 'completepopup' option with additional settings
to allow more configuration of info popup window.
New values:
```
- close "on" (default) or "off"
- resize "on" (default) or "off"
- borderchars specify eight characters (separated by semicolons) to
draw the popup border: top, right, bottom, left,
topleft, topright, botright, botleft.
- borderhighlight highlight group for the popup border characters
- shadow pum shadow
```
closes: #18487
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
e15cd0f065
commit
1a09f11f5d
@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 9.1. Last change: 2025 Oct 12
|
||||
*options.txt* For Vim version 9.1. Last change: 2025 Oct 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -2339,12 +2339,50 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global
|
||||
{not available when compiled without the |+textprop|
|
||||
or |+quickfix| feature}
|
||||
When 'completeopt' contains "popup" then this option is used for the
|
||||
When 'completeopt' contains "popup", this option specifies the
|
||||
properties of the info popup when it is created. If an info popup
|
||||
window already exists it is closed, so that the option value is
|
||||
applied when it is created again.
|
||||
You can also use |popup_findinfo()| and then set properties for an
|
||||
existing info popup with |popup_setoptions()|. See |complete-popup|.
|
||||
|
||||
The option is a comma-separated list of values:
|
||||
align "item" (default) or "menu"
|
||||
border border style:
|
||||
"single" thin box-drawing characters
|
||||
"double" double-line
|
||||
"round" rounded corners
|
||||
"ascii" ASCII characters (-, |, +)
|
||||
"custom:X;X;X;X;X;X;X;X"
|
||||
eight characters separated by
|
||||
semicolons, in the order: top,
|
||||
right, bottom, left, topleft,
|
||||
topright, botright, botleft
|
||||
"on" same as "double" when
|
||||
'encoding' is "utf-8" and
|
||||
'ambiwidth' is "single", else
|
||||
"ascii" (default)
|
||||
"off" no border
|
||||
borderhighlight highlight group for the popup border characters
|
||||
close show close button: "on" (default) or "off"
|
||||
height maximum height of the popup
|
||||
highlight popup highlight group (default: PmenuSel)
|
||||
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:─;│;─;│;┌;┐;┘;└
|
||||
<
|
||||
When "align" is set to "item", the popup is positioned near the
|
||||
selected item and moves as the selection changes.
|
||||
When set to "menu", the popup aligns with the top of the menu (if the
|
||||
menu appears below the text) or with the bottom (if it appears above).
|
||||
|
||||
The close button and resize handle are shown on the popup border only
|
||||
when 'mouse' is enabled.
|
||||
|
||||
After creation, the info popup can be located with |popup_findinfo()|
|
||||
and modified using |popup_setoptions()|. See also: |complete-popup|.
|
||||
|
||||
*'completeslash'* *'csl'*
|
||||
'completeslash' 'csl' string (default: "")
|
||||
|
||||
Reference in New Issue
Block a user