comparison runtime/doc/popup.txt @ 17161:9ccb1ea9b2fc

Update runtime files commit https://github.com/vim/vim/commit/6c1e1570b1346de0d438fbb991bddab38c228290 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 22 02:13:00 2019 +0200 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Sat, 22 Jun 2019 02:15:05 +0200
parents c90fdb999393
children f16cee6adf29
comparison
equal deleted inserted replaced
17160:706c7a4f3cb4 17161:9ccb1ea9b2fc
1 *popup.txt* For Vim version 8.1. Last change: 2019 Jun 15 1 *popup.txt* For Vim version 8.1. Last change: 2019 Jun 22
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
306 \ 'border': [], 306 \ 'border': [],
307 \ 'padding': [], 307 \ 'padding': [],
308 \ 'filter': 'popup_filter_menu', 308 \ 'filter': 'popup_filter_menu',
309 \ }) 309 \ })
310 < The current line is highlighted with a match using 310 < The current line is highlighted with a match using
311 PopupSelected, or |PmenuSel| if that is not defined. 311 "PopupSelected", or "PmenuSel" if that is not defined.
312 312
313 Use {options} to change the properties. Should at least set 313 Use {options} to change the properties. Should at least set
314 "callback" to a function that handles the selected item. 314 "callback" to a function that handles the selected item.
315 315
316 316
419 419
420 420
421 POPUP_CREATE() ARGUMENTS *popup_create-usage* 421 POPUP_CREATE() ARGUMENTS *popup_create-usage*
422 422
423 The first argument of |popup_create()| (and the second argument to 423 The first argument of |popup_create()| (and the second argument to
424 |popup_setttext()|) specifies the text to be displayed, and optionally text 424 |popup_settext()|) specifies the text to be displayed, and optionally text
425 properties. It is in one of three forms: 425 properties. It is in one of three forms:
426 - a string 426 - a string
427 - a list of strings 427 - a list of strings
428 - a list of dictionaries, where each dictionary has these entries: 428 - a list of dictionaries, where each dictionary has these entries:
429 text String with the text to display. 429 text String with the text to display.
476 looks like the text scrolled up. When out of range 476 looks like the text scrolled up. When out of range
477 the last buffer line will at the top of the window. 477 the last buffer line will at the top of the window.
478 hidden When TRUE the popup exists but is not displayed; use 478 hidden When TRUE the popup exists but is not displayed; use
479 `popup_show()` to unhide it. 479 `popup_show()` to unhide it.
480 {not implemented yet} 480 {not implemented yet}
481 tabpage When -1: display the popup on all tabs. 481 tabpage When -1: display the popup on all tab pages.
482 When 0 (the default): display the popup on the current 482 When 0 (the default): display the popup on the current
483 tab page. 483 tab page.
484 Otherwise the number of the tab page the popup is 484 Otherwise the number of the tab page the popup is
485 displayed on; when invalid the popup is not created 485 displayed on; when invalid the popup is not created
486 and an error is given. *E996* 486 and an error is given. *E996*
521 Example: ['-', '|', '-', '|', '┌', '┐', '┘', '└'] 521 Example: ['-', '|', '-', '|', '┌', '┐', '┘', '└']
522 When the list has one character it is used for all. 522 When the list has one character it is used for all.
523 When the list has two characters the first is used for 523 When the list has two characters the first is used for
524 the border lines, the second for the corners. 524 the border lines, the second for the corners.
525 By default a double line is used all around when 525 By default a double line is used all around when
526 'encoding' is "utf-8" and 'ambiwidth' is "single, 526 'encoding' is "utf-8" and 'ambiwidth' is "single",
527 otherwise ASCII characters are used. 527 otherwise ASCII characters are used.
528 zindex Priority for the popup, default 50. Minimum value is 528 zindex Priority for the popup, default 50. Minimum value is
529 1, maximum value is 32000. 529 1, maximum value is 32000.
530 time Time in milliseconds after which the popup will close. 530 time Time in milliseconds after which the popup will close.
531 When omitted |popup_close()| must be used. 531 When omitted |popup_close()| must be used.
651 \ }) 651 \ })
652 < 652 <
653 *popup_menu-shortcut-example* 653 *popup_menu-shortcut-example*
654 Extend popup_filter_menu() with shortcut keys: > 654 Extend popup_filter_menu() with shortcut keys: >
655 655
656 call popup_menu('Save', 'Cancel', 'Discard'], { 656 call popup_menu(['Save', 'Cancel', 'Discard'], {
657 \ 'filter': 'MyMenuFilter', 657 \ 'filter': 'MyMenuFilter',
658 \ 'callback': 'MyMenuHandler', 658 \ 'callback': 'MyMenuHandler',
659 \ }) 659 \ })
660 660
661 func MyMenuFilter(id, key) 661 func MyMenuFilter(id, key)