summaryrefslogtreecommitdiffstats
path: root/runtime/doc/popup.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-11-09 15:33:31 +0100
committerBram Moolenaar <Bram@vim.org>2019-11-09 15:33:31 +0100
commit4dd8fe0b4f49ec267640fb457672452825b11df0 (patch)
tree1c25bc51db2251b5df692baf450ebab4dca74aea /runtime/doc/popup.txt
parent34059e7b67ae8a58dc2471b309afe05d9dde760f (diff)
patch 8.1.2273: wrong default when "pos" is changed with popup_atcursor()v8.1.2273
Problem: Wrong default when "pos" is changed with popup_atcursor(). Solution: Adjust the default line and col when "pos" is not the default value. (#5151)
Diffstat (limited to 'runtime/doc/popup.txt')
-rw-r--r--runtime/doc/popup.txt20
1 files changed, 15 insertions, 5 deletions
diff --git a/runtime/doc/popup.txt b/runtime/doc/popup.txt
index fc00ecffcd..0dd8d1ac04 100644
--- a/runtime/doc/popup.txt
+++ b/runtime/doc/popup.txt
@@ -1,4 +1,4 @@
-*popup.txt* For Vim version 8.1. Last change: 2019 Nov 03
+*popup.txt* For Vim version 8.1. Last change: 2019 Nov 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -186,6 +186,8 @@ popup_atcursor({what}, {options}) *popup_atcursor()*
\ moved: 'WORD',
\ })
< Use {options} to change the properties.
+ If "pos" is passed as "topleft" then the default for "line"
+ becomes "cursor+1".
Can also be used as a |method|: >
GetText()->popup_atcursor({})
@@ -362,7 +364,8 @@ popup_getpos({id}) *popup_getpos()*
core_height height of the text box in screen cells
firstline line of the buffer at top (1 unless scrolled)
(not the value of the "firstline" property)
- lastline line of the buffer at the bottom
+ lastline line of the buffer at the bottom (updated when
+ the popup is redrawn)
scrollbar non-zero if a scrollbar is displayed
visible one if the popup is displayed, zero if hidden
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:
Alternatively "center" can be used to position the
popup in the center of the Vim window, in which case
"line" and "col" are ignored.
+ posinvert When FALSE the value of "pos" is always used. When
+ TRUE (the default) and the popup does not fit
+ vertically and there is more space on the other side
+ then the popup is placed on the other side of the
+ position indicated by "line".
textprop When present the popup is positioned next to a text
property with this name and will move when the text
property moves. Use an empty string to remove. See
@@ -686,6 +694,8 @@ The second argument of |popup_create()| is a dictionary with options:
- [{lnum}, {start}, {end}]: if the cursor moved away
from line {lnum}, before column {start} or after
{end}
+ - [0, 0, 0] do not close the popup when the cursor
+ moves
The popup also closes if the cursor moves to another
line or to another window.
mousemoved Like "moved" but referring to the mouse pointer
@@ -852,9 +862,9 @@ Some recommended key actions:
cursor keys select another entry
Tab accept current suggestion
-A mouse click arrives as <LeftMouse>. The coordinates are in
-v:mouse_popup_col and v:mouse_popup_row. The top-left screen cell of the
-popup is col 1, row 1 (not counting the border).
+A mouse click arrives as <LeftMouse>. The coordinates are in |v:mouse_col|
+and |v:mouse_lnum|. The top-left screen cell of the popup is col 1, row 1
+(not counting the border).
Vim provides standard filters |popup_filter_menu()| and
|popup_filter_yesno()|.