diff runtime/doc/popup.txt @ 16841:cf630fab9fb6 v8.1.1422

patch 8.1.1422: popup_getoptions() not implemented yet commit https://github.com/vim/vim/commit/8c2a600f72ca930841a5f4f7eac22884238afaf3 Author: Bram Moolenaar <Bram@vim.org> Date: Thu May 30 14:29:45 2019 +0200 patch 8.1.1422: popup_getoptions() not implemented yet Problem: Popup_getoptions() not implemented yet. Solution: Implement it. (closes https://github.com/vim/vim/issues/4452)
author Bram Moolenaar <Bram@vim.org>
date Thu, 30 May 2019 14:30:07 +0200
parents 6699c03347d2
children e6bcccccbf7b
line wrap: on
line diff
--- a/runtime/doc/popup.txt
+++ b/runtime/doc/popup.txt
@@ -86,15 +86,18 @@ Probably 2. is the best choice.
 IMPLEMENTATION:
 - Code is in popupwin.c
 - when creating the window set options to Vim default? (verify with 'number')
-- Do not show tilde below last line.
 - Implement filter.
   Check that popup_close() works in the filter.
+- Implement the "pos" option.
 - Handle screen resize in screenalloc().
 - Make redrawing more efficient and avoid flicker.
+    Store popup info in a mask, use the mask in screen_line()
     Fix redrawing problem with completion.
     Fix redrawing problem when scrolling non-current window
     Fix redrawing the statusline on top of a popup
-- Properly figure out the size and position.
+- Figure out the size and position better.
+    if wrapping splits a double-wide character
+    if wrapping has an indent
 - Can the buffer be re-used, to avoid using up lots of buffer numbers?
 - Implement all the unimplemented options and features.
 
@@ -228,16 +231,23 @@ popup_setoptions({id}, {options})			*pop
 
 
 popup_getoptions({id})					*popup_getoptions()*
-	  	{not implemented yet}
-		Return the {options} for popup {id}.
+		Return the {options} for popup {id} in a Dict.
+		A zero value means the option was not set.
+
+		The "highlight" entry is omitted, use the 'wincolor' option
+		for that: >
+			let hl = getwinvar(winid, '&wincolor')
+
+<		If popup window {id} is not found an empty Dict is returned.
 
 popup_getposition({id})					*popup_getposition()*
 		Return the position and size of popup {id}.  Returns a Dict
 		with these entries:
-			col	screen column of the popup, one-based
-			line	screen line of the popup, one-based
-			width	width of the popup in screen cells
-			height	height of the popup in screen cells
+		    col		screen column of the popup, one-based
+		    line	screen line of the popup, one-based
+		    width	width of the popup in screen cells
+		    height	height of the popup in screen cells
+		    visible 	one if the popup is displayed, zero if hidden
 		Note that these are the actual screen positions.  They differ
 		from the values in `popup_getoptions()` for the sizing and
 		positioning mechanism applied.
@@ -304,9 +314,9 @@ The second argument of |popup_create()| 
 			{only number is implemented}
 	pos		"topleft", "topright", "botleft" or "botright":
 			defines what corner of the popup "line" and "col" are
-			used for.  Default is "botleft".  Alternatively
-			"center" can be used to position the popup in the
-			center of the Vim window.
+			used for.  When not set "topleft" is used.
+			Alternatively "center" can be used to position the
+			popup in the center of the Vim window.
 			{not implemented yet}
 	flip		when TRUE (the default) and the position is relative
 			to the cursor, flip to below or above the cursor to