|
1 | | -*popup.txt* For Vim version 8.1. Last change: 2019 Jun 22 |
| 1 | +*popup.txt* For Vim version 8.1. Last change: 2019 Jun 29 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -86,9 +86,12 @@ that it is in. |
86 | 86 |
|
87 | 87 |
|
88 | 88 | TODO: |
89 | | -- click near top of scrollbar scrolls down, clear near bottom scrolls up. |
90 | | -- Allow for setting scrollbar color: scrollbarhighlight, |
91 | | - scrollbarthumbhighlight ? |
| 89 | +- Currently 'buftype' is set to "popup", but all the specifics are on the |
| 90 | + window. Can we use a "normal" buffer and put the type on the window? (#4595) |
| 91 | + What if it's modified and the window closes? |
| 92 | +- Add test for when popup with mask is off the left and off the right of the |
| 93 | + screen. |
| 94 | +- check padding/border when popup is off the left and right of the screen. |
92 | 95 | - Have a way to scroll to the bottom? (#4577) |
93 | 96 | - Why does 'nrformats' leak from the popup window buffer??? |
94 | 97 | - Disable commands, feedkeys(), CTRL-W, etc. in a popup window. |
@@ -256,6 +259,8 @@ popup_getoptions({id}) *popup_getoptions()* |
256 | 259 | zero. When all values are one then an empty list is included. |
257 | 260 |
|
258 | 261 | "borderhighlight" is not included when all values are empty. |
| 262 | + "scrollbarhighlight" and "thumbhighlight" are onlu included |
| 263 | + when set. |
259 | 264 |
|
260 | 265 | "tabpage" will be -1 for a global popup, zero for a popup on |
261 | 266 | the current tabpage and a positive number for a popup on |
@@ -377,6 +382,8 @@ popup_setoptions({id}, {options}) *popup_setoptions()* |
377 | 382 | borderhighlight |
378 | 383 | borderchars |
379 | 384 | scrollbar |
| 385 | + scrollbarhighlight |
| 386 | + thumbhighlight |
380 | 387 | zindex |
381 | 388 | mask |
382 | 389 | time |
@@ -534,6 +541,13 @@ The second argument of |popup_create()| is a dictionary with options: |
534 | 541 | otherwise ASCII characters are used. |
535 | 542 | scrollbar non-zero: show a scrollbar when the text doesn't fit. |
536 | 543 | zero: do not show a scrollbar. Default is non-zero. |
| 544 | + Also see |popup-scrollbar|. |
| 545 | + scrollbarhighlight Highlight group name for the scrollbar. The |
| 546 | + background color is what matters. When not given then |
| 547 | + PmenuSbar is used. |
| 548 | + thumbhighlight Highlight group name for the scrollbar thumb. The |
| 549 | + background color is what matters. When not given then |
| 550 | + PmenuThumb is used. |
537 | 551 | zindex Priority for the popup, default 50. Minimum value is |
538 | 552 | 1, maximum value is 32000. |
539 | 553 | mask A list of lists with coordinates, defining parts of |
@@ -639,6 +653,17 @@ If the popup is force-closed, e.g. because the cursor moved or CTRL-C was |
639 | 653 | pressed, the number -1 is passed to the callback. |
640 | 654 |
|
641 | 655 |
|
| 656 | +POPUP SCROLLBAR *popup-scrollbar* |
| 657 | + |
| 658 | +If the text does not fit in the popup a scrollbar is displayed on the right of |
| 659 | +the window. This can be disabled by setting the "scrollbar" option to zero. |
| 660 | +When the scrollbar is displayed mouse scroll events, while the mouse pointer |
| 661 | +is on the popup, will cause the text to scroll up or down as you would expect. |
| 662 | +A click in the upper halve of the scrollbar will scroll the text one line |
| 663 | +down. A click in the lower halve wil scroll the text one line up. However, |
| 664 | +this is limited so that the popup does not get smaller. |
| 665 | + |
| 666 | + |
642 | 667 | POPUP MASK *popup-mask* |
643 | 668 |
|
644 | 669 | To minimize the text that the popup covers, parts of it can be made |
|
0 commit comments