mirror of
https://github.com/vim/vim.git
synced 2025-10-19 08:04:27 -04:00
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 @@
|
||||
*insert.txt* For Vim version 9.1. Last change: 2025 Oct 12
|
||||
*insert.txt* For Vim version 9.1. Last change: 2025 Oct 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1287,26 +1287,9 @@ remove existing text in the preview window. The size of the preview window is
|
||||
three lines, but 'previewheight' is used when it has a value of 1 or 2.
|
||||
|
||||
*complete-popup*
|
||||
When "popup" is in 'completeopt' a popup window is used to display the "info".
|
||||
Then the 'completepopup' option specifies the properties of the popup. This
|
||||
is used when the info popup is created. The option is a comma-separated list
|
||||
of values:
|
||||
height maximum height of the popup
|
||||
width maximum width of the popup
|
||||
highlight highlight group of the popup (default is PmenuSel)
|
||||
align "item" (default) or "menu"
|
||||
border "on" (default) or "off"
|
||||
Example: >
|
||||
:set completepopup=height:10,width:60,highlight:InfoPopup
|
||||
|
||||
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 the menu appears above).
|
||||
|
||||
If the 'mouse' is enabled, a close button and resize handle will appear on the
|
||||
popup border.
|
||||
|
||||
When "popup" is included in 'completeopt', a popup window is used to display
|
||||
the completion "info" text. The appearance and behavior of this popup are
|
||||
controlled by the 'completepopup' option when the popup is created.
|
||||
After creation, the info popup can be located with |popup_findinfo()| and
|
||||
modified using |popup_setoptions()|.
|
||||
|
||||
|
@@ -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: "")
|
||||
|
@@ -41717,6 +41717,7 @@ Options: ~
|
||||
to ">" by default, indicating text that extends beyond the window width.
|
||||
- 'guioptions': New value |'go-C'| to style the title/caption bar on Windows 11
|
||||
(see also the below platform specific change).
|
||||
- 'completepopup': Add more values to style popup windows.
|
||||
|
||||
Ex commands: ~
|
||||
- allow to specify a priority when defining a new sign |:sign-define|
|
||||
|
Reference in New Issue
Block a user