diff runtime/doc/popup.txt @ 16855:19162ff4eacd v8.1.1429

patch 8.1.1429: "pos" option of popup window not supported yet commit https://github.com/vim/vim/commit/ac1f1bc222b7de3cb2d3f1f2aa076f11c75e69de Author: Bram Moolenaar <Bram@vim.org> Date: Thu May 30 21:24:26 2019 +0200 patch 8.1.1429: "pos" option of popup window not supported yet Problem: "pos" option of popup window not supported yet. Solution: Implement the option. Rename popup_getposition() to popup_getpos().
author Bram Moolenaar <Bram@vim.org>
date Thu, 30 May 2019 21:30:04 +0200
parents e6bcccccbf7b
children 0154363d3b98
line wrap: on
line diff
--- a/runtime/doc/popup.txt
+++ b/runtime/doc/popup.txt
@@ -232,7 +232,8 @@ popup_setoptions({id}, {options})			*pop
 
 popup_getoptions({id})					*popup_getoptions()*
 		Return the {options} for popup {id} in a Dict.
-		A zero value means the option was not set.
+		A zero value means the option was not set.  For "zindex" the
+		default value is returned, not zero.
 
 		The "highlight" entry is omitted, use the 'wincolor' option
 		for that: >
@@ -240,7 +241,7 @@ popup_getoptions({id})					*popup_getopt
 
 <		If popup window {id} is not found an empty Dict is returned.
 
-popup_getposition({id})					*popup_getposition()*
+popup_getpos({id})					*popup_getpos()*
 		Return the position and size of popup {id}.  Returns a Dict
 		with these entries:
 		    col		screen column of the popup, one-based
@@ -303,19 +304,22 @@ optionally text properties.  It is in on
 			|popup-props|.
 
 The second argument of |popup_create()| is a dictionary with options:
-	line		screen line where to position the popup; can use
-			"cursor", "cursor+1" or "cursor-1" to use the line of
-			the cursor and add or subtract a number of lines;
-			default is "cursor-1".
-	col		screen column where to position the popup; can use
-			"cursor" to use the column of the cursor, "cursor+99"
-			and "cursor-99" to add or subtract a number of
-			columns; default is "cursor"
+	line		screen line where to position the popup; can use a
+			number or "cursor", "cursor+1" or "cursor-1" to use
+			the line of the cursor and add or subtract a number of
+			lines; if omitted the popup is vertically centered,
+			otherwise "pos" is used.
+	col		screen column where to position the popup; can use a
+			number or "cursor" to use the column of the cursor,
+			"cursor+99" and "cursor-99" to add or subtract a
+			number of columns; if omitted the popup is
+			horizontally centered, otherwise "pos" is used
 	pos		"topleft", "topright", "botleft" or "botright":
 			defines what corner of the popup "line" and "col" are
 			used for.  When not set "topleft" is used.
 			Alternatively "center" can be used to position the
-			popup in the center of the Vim window.
+			popup in the center of the Vim window, in which case
+			"line" and "col" are ignored.
 			{not implemented yet}
 	flip		when TRUE (the default) and the position is relative
 			to the cursor, flip to below or above the cursor to