Mercurial > vim
comparison runtime/doc/popup.txt @ 17123:efc6f5e3b543 v8.1.1561
patch 8.1.1561: popup_setoptions() is not implemented yet
commit https://github.com/vim/vim/commit/ae943150d3a2868a89df802c9f530331474451ec
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 16 22:54:14 2019 +0200
patch 8.1.1561: popup_setoptions() is not implemented yet
Problem: Popup_setoptions() is not implemented yet.
Solution: Implement popup_setoptions(). Also add more fields to
popup_getoptions().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 16 Jun 2019 23:00:05 +0200 |
parents | b439e096a011 |
children | c90fdb999393 |
comparison
equal
deleted
inserted
replaced
17122:310e8655d123 | 17123:efc6f5e3b543 |
---|---|
107 preview window. Ideas in issue #4544. | 107 preview window. Ideas in issue #4544. |
108 How to add highlighting? | 108 How to add highlighting? |
109 - When the lines do not fit show a scrollbar (like in the popup menu). | 109 - When the lines do not fit show a scrollbar (like in the popup menu). |
110 Use the mouse wheel for scrolling. | 110 Use the mouse wheel for scrolling. |
111 - Implement: | 111 - Implement: |
112 popup_setoptions({id}, {options}) | |
113 hidden option | |
114 tabpage option with number | 112 tabpage option with number |
115 flip option | 113 flip option |
116 transparent text property | 114 transparent text property |
117 | 115 |
118 | 116 |
245 popup_getoptions({id}) *popup_getoptions()* | 243 popup_getoptions({id}) *popup_getoptions()* |
246 Return the {options} for popup {id} in a Dict. | 244 Return the {options} for popup {id} in a Dict. |
247 A zero value means the option was not set. For "zindex" the | 245 A zero value means the option was not set. For "zindex" the |
248 default value is returned, not zero. | 246 default value is returned, not zero. |
249 | 247 |
250 The "highlight" entry is omitted, use the 'wincolor' option | 248 The "moved" entry is a list with minimum and maximum column, |
251 for that: > | 249 [0, 0] when not set. |
252 let hl = getwinvar(winid, '&wincolor') | 250 |
253 | 251 "border" and "padding" are not included when all values are |
254 < If popup window {id} is not found an empty Dict is returned. | 252 zero. When all values are one then an empty list is included. |
253 | |
254 "borderhighlight" is not included when all values are empty. | |
255 | |
256 If popup window {id} is not found an empty Dict is returned. | |
255 | 257 |
256 | 258 |
257 popup_getpos({id}) *popup_getpos()* | 259 popup_getpos({id}) *popup_getpos()* |
258 Return the position and size of popup {id}. Returns a Dict | 260 Return the position and size of popup {id}. Returns a Dict |
259 with these entries: | 261 with these entries: |
305 | 307 |
306 | 308 |
307 popup_move({id}, {options}) *popup_move()* | 309 popup_move({id}, {options}) *popup_move()* |
308 Move popup {id} to the position specified with {options}. | 310 Move popup {id} to the position specified with {options}. |
309 {options} may contain the items from |popup_create()| that | 311 {options} may contain the items from |popup_create()| that |
310 specify the popup position: "line", "col", "pos", "maxheight", | 312 specify the popup position: |
311 "minheight", "maxwidth" and "minwidth". | 313 line |
314 col | |
315 pos | |
316 maxheight | |
317 minheight | |
318 maxwidth | |
319 minwidth | |
320 fixed | |
312 For {id} see `popup_hide()`. | 321 For {id} see `popup_hide()`. |
322 For other options see |popup_setoptions()|. | |
313 | 323 |
314 | 324 |
315 popup_notification({text}, {options}) *popup_notification()* | 325 popup_notification({text}, {options}) *popup_notification()* |
316 Show the {text} for 3 seconds at the top of the Vim window. | 326 Show the {text} for 3 seconds at the top of the Vim window. |
317 This works like: > | 327 This works like: > |
339 If {id} is a hidden popup, show it now. | 349 If {id} is a hidden popup, show it now. |
340 For {id} see `popup_hide()`. | 350 For {id} see `popup_hide()`. |
341 | 351 |
342 | 352 |
343 popup_setoptions({id}, {options}) *popup_setoptions()* | 353 popup_setoptions({id}, {options}) *popup_setoptions()* |
344 {not implemented yet} | |
345 Override options in popup {id} with entries in {options}. | 354 Override options in popup {id} with entries in {options}. |
355 These options can be set: | |
356 flip | |
357 firstline | |
358 title | |
359 wrap | |
360 drag | |
361 highlight | |
362 padding | |
363 border | |
364 borderhighlight | |
365 borderchars | |
366 zindex | |
367 time | |
368 moved | |
369 filter | |
370 callback | |
371 The options from |popup_move()| can also be used. | |
372 For "hidden" use |popup_hide()| and |popup_show()|. | |
373 "tabpage" cannot be changed. | |
346 | 374 |
347 popup_settext({id}, {text}) *popup_settext()* | 375 popup_settext({id}, {text}) *popup_settext()* |
348 Set the text of the buffer in poup win {id}. {text} is the | 376 Set the text of the buffer in poup win {id}. {text} is the |
349 same as supplied to |popup_create()|. | 377 same as supplied to |popup_create()|. |
350 Does not change the window size or position, other than caused | 378 Does not change the window size or position, other than caused |