@@ -90,6 +90,7 @@ Probably 2. is the best choice.
9090
9191IMPLEMENTATION:
9292- Code is in popupwin.c
93+ - Fix positioning with border and padding.
9394- Why does 'nrformats' leak from the popup window buffer???
9495- Make redrawing more efficient and avoid flicker.
9596 Store popup info in a mask, use the mask in screen_line()
@@ -133,10 +134,15 @@ popup_create({text}, {options}) *popup_create()*
133134< In case of failure zero is returned.
134135
135136
136- popup_close({id} ) *popup_close()*
137+ popup_close({id} [, {result} ]) *popup_close()*
137138 Close popup {id} . The window and the associated buffer will
138139 be deleted.
139140
141+ If the popup has a callback it will be called just before the
142+ popup window is deleted. If the optional {result} is present
143+ it will be passed as the second argument of the callback.
144+ Otherwise zero is passed to the callback.
145+
140146
141147popup_dialog({text} , {options} ) *popup_dialog()*
142148 {not implemented yet}
@@ -145,6 +151,7 @@ popup_dialog({text}, {options}) *popup_dialog()*
145151 \ 'pos': 'center',
146152 \ 'zindex': 200,
147153 \ 'border': [],
154+ \ 'padding': [],
148155 \})
149156< Use {options} to change the properties.
150157
@@ -166,6 +173,7 @@ popup_notification({text}, {options}) *popup_notification()*
166173
167174
168175popup_atcursor({text} , {options} ) *popup_atcursor()*
176+ {not implemented yet: close when cursor moves}
169177 Show the {text} above the cursor, and close it when the cursor
170178 moves. This works like: >
171179 call popup_create({text}, {
@@ -394,7 +402,6 @@ The second argument of |popup_create()| is a dictionary with options:
394402 | popup-filter |
395403 callback a callback to be used when the popup closes, e.g. when
396404 using | popup_filter_menu() | , see | popup-callback | .
397- {not implemented yet}
398405
399406Depending on the "zindex" the popup goes under or above other popups. The
400407completion menu (| popup-menu | ) has zindex 100. For messages that occur for a
@@ -477,11 +484,12 @@ Vim recognizes the Esc key. If you do use Esc, it is reecommended to set the
477484
478485POPUP CALLBACK *popup-callback*
479486
480- {not implemented yet}
481487A callback that is invoked when the popup closes. Used by
482- | popup_filter_menu() | . Invoked with two arguments: the ID of the popup and
483- the result, which would usually be an index in the popup lines, or whatever
484- the filter wants to pass.
488+ | popup_filter_menu() | .
489+
490+ The callback is invoked with two arguments: the ID of the popup window and the
491+ result, which could be an index in the popup lines, or whatever was passed as
492+ the second argument of `popup_close ()` .
485493
486494==============================================================================
4874953. Examples *popup-examples*
0 commit comments