1- *popup.txt* For Vim version 8.1. Last change: 2019 Jun 09
1+ *popup.txt* For Vim version 8.1. Last change: 2019 Jun 10
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
55
66
77Displaying text in floating window. *popup* *popup-window*
88
9- THIS IS UNDER DESIGN - ANYTHING MAY STILL CHANGE
9+ THIS IS UNDER DESIGN - ANYTHING MAY STILL CHANGE
1010
11111. Introduction | popup-intro |
12122. Functions | popup-functions |
@@ -76,31 +76,21 @@ else. E.g. if you use `popup_atcursor()` the popup normally shows just above
7676the current cursor position, but if the cursor is close to the top of the Vim
7777window it will be placed below the cursor position.
7878
79+ When the screen scrolls up for output of an Ex command, popups move too, so
80+ that they will not cover the output.
7981
8082
81- TODO:
82-
83- Scrolling: When the screen scrolls up for output of an Ex command, what
84- happens with popups?
85- 1. Stay where they are. Problem: listed text may go behind and can't be read.
86- 2. Scroll with the page. What if they get updated? Either postpone, or take
87- the scroll offset into account.
88- Probably 2. is the best choice.
8983
9084
9185IMPLEMENTATION:
92- - buffers remain after popup was deleted.
93- - do not redraw whole window when popup was changed, mark affected lines for
94- redraw.
86+ - buffers remain after a popup was deleted.
9587- Why does 'nrformats' leak from the popup window buffer???
96- - Add 'balloonpopup' : instead of showing text, let the callback open a balloon
97- and return the window ID. The popup will then be closed when the mouse
98- moves, except when it moves inside the popup.
88+ - Add 'balloonpopup' : instead of showing text, let the callback open a popup
89+ window and return the window ID. The popup will then be closed when the
90+ mouse moves, except when it moves inside the popup.
9991- For the "moved" property also include mouse movement?
10092- Make redrawing more efficient and avoid flicker:
10193 - put popup menu also put in popup_mask?
102- - Use changes in popup_mask to decide what windows and range of lines to
103- redraw?
10494- Disable commands, feedkeys(), CTRL-W , etc. in a popup window.
10595 Use NOT_IN_POPUP_WINDOW for more commands.
10696- Invoke filter with character before mapping?
@@ -114,7 +104,7 @@ IMPLEMENTATION:
114104==============================================================================
1151052. Functions *popup-functions*
116106
117- THIS IS UNDER DESIGN - ANYTHING MAY STILL CHANGE
107+ THIS IS UNDER DESIGN - ANYTHING MAY STILL CHANGE
118108
119109[functions to be moved to eval.txt later, keep overview of functions here]
120110
@@ -164,7 +154,7 @@ popup_create({text}, {options}) *popup_create()*
164154
165155
166156popup_dialog({text} , {options} ) *popup_dialog()*
167- {not implemented yet}
157+ {not implemented yet}
168158 Just like | popup_create() | but with these default options: >
169159 call popup_create({text}, {
170160 \ 'pos': 'center',
@@ -176,7 +166,7 @@ popup_dialog({text}, {options}) *popup_dialog()*
176166
177167
178168popup_filter_menu({id} , {key} ) *popup_filter_menu()*
179- {not implemented yet}
169+ {not implemented yet}
180170 Filter that can be used for a popup. It handles the cursor
181171 keys to move the selected index in the popup. Space and Enter
182172 can be used to select an item. Invokes the "callback" of the
@@ -185,7 +175,7 @@ popup_filter_menu({id}, {key}) *popup_filter_menu()*
185175
186176
187177popup_filter_yesno({id} , {key} ) *popup_filter_yesno()*
188- {not implemented yet}
178+ {not implemented yet}
189179 Filter that can be used for a popup. It handles only the keys
190180 'y', 'Y' and 'n' or 'N'. Invokes the "callback" of the
191181 popup menu with the 1 for 'y' or 'Y' and zero for 'n' or 'N'
@@ -216,7 +206,7 @@ popup_getpos({id}) *popup_getpos()*
216206 core_line screen line of the text box
217207 core_width width of the text box in screen cells
218208 core_height height of the text box in screen cells
219- visible one if the popup is displayed, zero if hidden
209+ visible one if the popup is displayed, zero if hidden
220210 Note that these are the actual screen positions. They differ
221211 from the values in `popup_getoptions ()` for the sizing and
222212 positioning mechanism applied.
@@ -235,7 +225,7 @@ popup_hide({id}) *popup_hide()*
235225
236226
237227popup_menu({text} , {options} ) *popup_menu()*
238- {not implemented yet}
228+ {not implemented yet}
239229 Show the {text} near the cursor, handle selecting one of the
240230 items with cursorkeys, and close it an item is selected with
241231 Space or Enter. {text} should have multiple lines to make this
@@ -260,7 +250,7 @@ popup_move({id}, {options}) *popup_move()*
260250
261251
262252popup_notification({text} , {options} ) *popup_notification()*
263- {not implemented yet}
253+ {not implemented yet}
264254 Show the {text} for 3 seconds at the top of the Vim window.
265255 This works like: >
266256 call popup_create({text}, {
@@ -281,7 +271,7 @@ popup_show({id}) *popup_show()*
281271
282272
283273popup_setoptions({id} , {options} ) *popup_setoptions()*
284- {not implemented yet}
274+ {not implemented yet}
285275 Override options in popup {id} with entries in {options} .
286276
287277
@@ -292,7 +282,7 @@ A new buffer is created to hold the text and text properties of the popup
292282window. The buffer is always associated with the popup window and
293283manipulation is restricted:
294284- the buffer has no name
295- - 'buftype' is "popup"
285+ - 'buftype' is "popup"
296286- 'swapfile' is off
297287- 'bufhidden' is "hide"
298288- 'buflisted' is off
@@ -424,7 +414,7 @@ The second argument of |popup_create()| is a dictionary with options:
424414 {start} or after {end}
425415 The popup also closes if the cursor moves to another
426416 line or to another window.
427- filter A callback that can filter typed characters, see
417+ filter A callback that can filter typed characters, see
428418 | popup-filter | .
429419 callback A callback that is called when the popup closes, e.g.
430420 when using | popup_filter_menu() | , see | popup-callback | .
@@ -486,7 +476,7 @@ key, e.g.: >
486476 return 1
487477 endif
488478 return 0
489- endfunc
479+ endfunc
490480
491481 Currently the key is what results after any mapping. This may change...
492482
0 commit comments