1- *popup.txt* For Vim version 8.1. Last change: 2019 May 26
1+ *popup.txt* For Vim version 8.1. Last change: 2019 May 31
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -13,9 +13,7 @@ THIS IS UNDER DESIGN - ANYTHING MAY STILL CHANGE
13133. Examples | popup-examples |
1414
1515
16- {not available if the | +eval | feature was disabled at compile time}
17- {not able to use text properties if the | +textprop | feature was disabled at
18- compile time}
16+ {not available if the | +textprop | feature was disabled at compile time}
1917
2018==============================================================================
21191. Introduction *popup-intro*
@@ -60,15 +58,22 @@ WINDOW POSITION AND SIZE *popup-position*
6058
6159The height of the window is normally equal to the number of, possibly
6260wrapping, lines in the buffer. It can be limited with the "maxheight"
63- property. You can use empty lines to increase the height.
61+ property. You can use empty lines to increase the height or the "minheight"
62+ property.
6463
6564The width of the window is normally equal to the longest line in the buffer.
6665It can be limited with the "maxwidth" property. You can use spaces to
67- increase the width.
66+ increase the width or the "minwidth" property .
6867
6968By default the 'wrap' option is set, so that no text disappears. However, if
7069there is not enough space, some text may be invisible.
7170
71+ Vim tries to show the popup in the location you specify. In some cases, e.g.
72+ when the popup would go outside of the Vim window, it will show it somewhere
73+ else. E.g. if you use `popup_atcursor ()` the popup normally shows just above
74+ the current cursor position, but if the cursor is close to the top of the Vim
75+ window it will be placed below the cursor position.
76+
7277
7378
7479TODO:
@@ -92,9 +97,13 @@ IMPLEMENTATION:
9297- Handle screen resize in screenalloc().
9398- Make redrawing more efficient and avoid flicker.
9499 Store popup info in a mask, use the mask in screen_line()
100+ Keep mask until next update_screen(), find differences and redraw affected
101+ windows/lines
95102 Fix redrawing problem with completion.
96103 Fix redrawing problem when scrolling non-current window
97104 Fix redrawing the statusline on top of a popup
105+ - Disable commands, feedkeys(), CTRL-W , etc. in a popup window. Or whitelist
106+ commands that are allowed?
98107- Figure out the size and position better.
99108 if wrapping splits a double-wide character
100109 if wrapping inserts indent
@@ -114,7 +123,7 @@ popup_create({text}, {options}) *popup_create()*
114123 - a string
115124 - a list of strings
116125 - a list of text lines with text properties
117- {not implemented yet}
126+
118127 {options} is a dictionary with many possible entries.
119128 See | popup_create-usage | for details.
120129
@@ -410,7 +419,7 @@ So we get:
410419 type name of the text property type, as added with
411420 | prop_type_add() |
412421 transparent do not show these characters, show the text under it;
413- if there is an border character to the right or below
422+ if there is a border character to the right or below
414423 it will be made transparent as well
415424 {not implemented yet}
416425
0 commit comments