1
- *popup.txt* For Vim version 8.1 . Last change: 2019 Nov 03
1
+ *popup.txt* For Vim version 8.2 . Last change: 2019 Nov 30
2
2
3
3
4
4
VIM REFERENCE MANUAL by Bram Moolenaar
5
5
6
6
7
- Displaying text in a floating window. *popup* *popup-window*
7
+ Displaying text in a floating window. *popup* *popup-window* *popupwin *
8
8
9
9
10
10
1. Introduction | popup-intro |
@@ -24,7 +24,7 @@ Displaying text in a floating window. *popup* *popup-window*
24
24
4. Examples | popup-examples |
25
25
26
26
27
- {not available if the | +textprop | feature was disabled at compile time}
27
+ {not available if the | +popupwin | feature was disabled at compile time}
28
28
29
29
==============================================================================
30
30
1. Introduction *popup-intro*
@@ -186,6 +186,8 @@ popup_atcursor({what}, {options}) *popup_atcursor()*
186
186
\ moved: 'WORD',
187
187
\ })
188
188
< Use {options} to change the properties.
189
+ If "pos" is passed as "topleft" then the default for "line"
190
+ becomes "cursor+1".
189
191
190
192
Can also be used as a | method | : >
191
193
GetText()->popup_atcursor({})
@@ -362,7 +364,8 @@ popup_getpos({id}) *popup_getpos()*
362
364
core_height height of the text box in screen cells
363
365
firstline line of the buffer at top (1 unless scrolled)
364
366
(not the value of the "firstline" property)
365
- lastline line of the buffer at the bottom
367
+ lastline line of the buffer at the bottom (updated when
368
+ the popup is redrawn)
366
369
scrollbar non-zero if a scrollbar is displayed
367
370
visible one if the popup is displayed, zero if hidden
368
371
Note that these are the actual screen positions. They differ
@@ -566,6 +569,11 @@ The second argument of |popup_create()| is a dictionary with options:
566
569
Alternatively "center" can be used to position the
567
570
popup in the center of the Vim window, in which case
568
571
"line" and "col" are ignored.
572
+ posinvert When FALSE the value of "pos" is always used. When
573
+ TRUE (the default) and the popup does not fit
574
+ vertically and there is more space on the other side
575
+ then the popup is placed on the other side of the
576
+ position indicated by "line".
569
577
textprop When present the popup is positioned next to a text
570
578
property with this name and will move when the text
571
579
property moves. Use an empty string to remove. See
@@ -686,6 +694,8 @@ The second argument of |popup_create()| is a dictionary with options:
686
694
- [{lnum} , {start} , {end} ]: if the cursor moved away
687
695
from line {lnum} , before column {start} or after
688
696
{end}
697
+ - [0, 0, 0] do not close the popup when the cursor
698
+ moves
689
699
The popup also closes if the cursor moves to another
690
700
line or to another window.
691
701
mousemoved Like "moved" but referring to the mouse pointer
@@ -852,9 +862,8 @@ Some recommended key actions:
852
862
cursor keys select another entry
853
863
Tab accept current suggestion
854
864
855
- A mouse click arrives as <LeftMouse> . The coordinates are in
856
- v:mouse_popup_col and v:mouse_popup_row. The top-left screen cell of the
857
- popup is col 1, row 1 (not counting the border).
865
+ A mouse click arrives as <LeftMouse> . The coordinates can be obtained with
866
+ | getmousepos() | .
858
867
859
868
Vim provides standard filters | popup_filter_menu() | and
860
869
| popup_filter_yesno() | .
0 commit comments