|
1 | | -*popup.txt* For Vim version 8.1. Last change: 2019 Aug 31 |
| 1 | +*popup.txt* For Vim version 8.1. Last change: 2019 Sep 03 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -442,7 +442,7 @@ popup_notification({what}, {options}) *popup_notification()* |
442 | 442 | < The PopupNotification highlight group is used instead of |
443 | 443 | WarningMsg if it is defined. |
444 | 444 |
|
445 | | - Without the |+timers| feature the poup will not disappear |
| 445 | + Without the |+timers| feature the popup will not disappear |
446 | 446 | automatically, the user has to click in it. |
447 | 447 |
|
448 | 448 | The position will be adjusted to avoid overlap with other |
@@ -486,7 +486,7 @@ popup_setoptions({id}, {options}) *popup_setoptions()* |
486 | 486 | "tabpage" cannot be changed. |
487 | 487 |
|
488 | 488 | popup_settext({id}, {text}) *popup_settext()* |
489 | | - Set the text of the buffer in poup win {id}. {text} is the |
| 489 | + Set the text of the buffer in popup win {id}. {text} is the |
490 | 490 | same as supplied to |popup_create()|, except that a buffer |
491 | 491 | number is not allowed. |
492 | 492 | Does not change the window size or position, other than caused |
@@ -583,13 +583,13 @@ The second argument of |popup_create()| is a dictionary with options: |
583 | 583 | start and end as padding. |
584 | 584 | wrap TRUE to make the lines wrap (default TRUE). |
585 | 585 | drag TRUE to allow the popup to be dragged with the mouse |
586 | | - by grabbing at at the border. Has no effect if the |
| 586 | + by grabbing at the border. Has no effect if the |
587 | 587 | popup does not have a border. As soon as dragging |
588 | 588 | starts and "pos" is "center" it is changed to |
589 | 589 | "topleft". |
590 | 590 | resize TRUE to allow the popup to be resized with the mouse |
591 | | - by grabbing at at the bottom right cornder. Has no |
592 | | - effect if the popup does not have a border. |
| 591 | + by grabbing at the bottom right corner. Has no effect |
| 592 | + if the popup does not have a border. |
593 | 593 | close When "button" an X is displayed in the top-right, on |
594 | 594 | top of any border, padding or text. When clicked on |
595 | 595 | the X the popup will close. Any callback is invoked |
@@ -662,6 +662,18 @@ The second argument of |popup_create()| is a dictionary with options: |
662 | 662 | mapping Allow for key mapping. When FALSE and the popup is |
663 | 663 | visible and has a filter callback key mapping is |
664 | 664 | disabled. Default value is TRUE. |
| 665 | + filtermode In which modes the filter is used (same flags as with |
| 666 | + |hasmapto()| plus "a"): |
| 667 | + n Normal mode |
| 668 | + v Visual and Select mode |
| 669 | + x Visual mode |
| 670 | + s Select mode |
| 671 | + o Operator-pending mode |
| 672 | + i Insert mode |
| 673 | + l Language-Argument ("r", "f", "t", etc.) |
| 674 | + c Command-line mode |
| 675 | + a all modes |
| 676 | + The default value is "a". |
665 | 677 | callback A callback that is called when the popup closes, e.g. |
666 | 678 | when using |popup_filter_menu()|, see |popup-callback|. |
667 | 679 |
|
@@ -784,13 +796,20 @@ key as a string, e.g.: > |
784 | 796 | endif |
785 | 797 | return 0 |
786 | 798 | endfunc |
787 | | -< *popup-mapping* |
| 799 | +< *popup-filter-mode* |
| 800 | +The "filtermode" property can be used to specify in what mode the filter is |
| 801 | +invoked. The default is "a": all modes. When using "nvi" Command-line mode |
| 802 | +is not included, so that any command typed on the command line is not |
| 803 | +filtered. However, to get to Command-line mode the filter must not consume |
| 804 | +":". Just like it must not consume "v" to allow for entering Visual mode. |
| 805 | + |
| 806 | + *popup-mapping* |
788 | 807 | Normally the key is what results after any mapping, since the keys pass on as |
789 | 808 | normal input if the filter does not use it. If the filter consumes all the |
790 | 809 | keys, set the "mapping" property to zero so that mappings do not get in the |
791 | 810 | way. This is default for |popup_menu()| and |popup_dialog()|. |
792 | 811 |
|
793 | | -Some common key actions: |
| 812 | +Some recommended key actions: |
794 | 813 | x close the popup (see note below) |
795 | 814 | cursor keys select another entry |
796 | 815 | Tab accept current suggestion |
@@ -941,7 +960,7 @@ this example simulated with a timer callback: > |
941 | 960 | call popup_close(s:winid) |
942 | 961 | let s:winid = 0 |
943 | 962 | endif |
944 | | - " simulate an asynchronous loopup for the text to display |
| 963 | + " simulate an asynchronous lookup for the text to display |
945 | 964 | let s:balloonText = v:beval_text |
946 | 965 | call timer_start(100, 'ShowPopup') |
947 | 966 | return '' |
|
0 commit comments