Mercurial > vim
comparison runtime/doc/popup.txt @ 17162:f16cee6adf29 v8.1.1580
patch 8.1.1580: cannot make part of a popup transparent
commit https://github.com/vim/vim/commit/c662ec9978e9a381680ffe53d05da0e10bb8d1a0
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 23 00:15:57 2019 +0200
patch 8.1.1580: cannot make part of a popup transparent
Problem: Cannot make part of a popup transparent.
Solution: Add the "mask" option.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 23 Jun 2019 00:30:04 +0200 |
parents | 9ccb1ea9b2fc |
children | 23609a6d8cc7 |
comparison
equal
deleted
inserted
replaced
17161:9ccb1ea9b2fc | 17162:f16cee6adf29 |
---|---|
110 - Use a popup window for the "info" item of completion instead of using a | 110 - Use a popup window for the "info" item of completion instead of using a |
111 preview window. Ideas in issue #4544. | 111 preview window. Ideas in issue #4544. |
112 How to add highlighting? | 112 How to add highlighting? |
113 - Implement: | 113 - Implement: |
114 flip option | 114 flip option |
115 transparent area, to minimize covering text. Define rectangles? | |
116 | 115 |
117 ============================================================================== | 116 ============================================================================== |
118 2. Functions *popup-functions* | 117 2. Functions *popup-functions* |
119 | 118 |
120 THIS IS UNDER DESIGN - ANYTHING MAY STILL CHANGE | 119 THIS IS UNDER DESIGN - ANYTHING MAY STILL CHANGE |
370 padding | 369 padding |
371 border | 370 border |
372 borderhighlight | 371 borderhighlight |
373 borderchars | 372 borderchars |
374 zindex | 373 zindex |
374 mask | |
375 time | 375 time |
376 moved | 376 moved |
377 filter | 377 filter |
378 callback | 378 callback |
379 The options from |popup_move()| can also be used. | 379 The options from |popup_move()| can also be used. |
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 mask A list of lists with coordinates, defining parts of | |
531 the popup that are transparent. See |popup-mask|. | |
530 time Time in milliseconds after which the popup will close. | 532 time Time in milliseconds after which the popup will close. |
531 When omitted |popup_close()| must be used. | 533 When omitted |popup_close()| must be used. |
532 moved Specifies to close the popup if the cursor moved: | 534 moved Specifies to close the popup if the cursor moved: |
533 - "any": if the cursor moved at all | 535 - "any": if the cursor moved at all |
534 - "word": if the cursor moved outside |<cword>| | 536 - "word": if the cursor moved outside |<cword>| |
555 | 557 |
556 These are similar to the third argument of |prop_add()| except: | 558 These are similar to the third argument of |prop_add()| except: |
557 - "lnum" is always the current line in the list | 559 - "lnum" is always the current line in the list |
558 - "bufnr" is always the buffer of the popup | 560 - "bufnr" is always the buffer of the popup |
559 - "col" is in the Dict instead of a separate argument | 561 - "col" is in the Dict instead of a separate argument |
560 - "transparent" is extra | |
561 So we get: | 562 So we get: |
562 col starting column, counted in bytes, use one for the | 563 col starting column, counted in bytes, use one for the |
563 first column. | 564 first column. |
564 length length of text in bytes; can be zero | 565 length length of text in bytes; can be zero |
565 end_lnum line number for the end of the text | 566 end_lnum line number for the end of the text |
568 zero-width text property | 569 zero-width text property |
569 id user defined ID for the property; when omitted zero is | 570 id user defined ID for the property; when omitted zero is |
570 used | 571 used |
571 type name of the text property type, as added with | 572 type name of the text property type, as added with |
572 |prop_type_add()| | 573 |prop_type_add()| |
573 transparent do not show these characters, show the text under it; | |
574 if there is a border character to the right or below | |
575 it will be made transparent as well | |
576 {not implemented yet} | |
577 | 574 |
578 | 575 |
579 POPUP FILTER *popup-filter* | 576 POPUP FILTER *popup-filter* |
580 | 577 |
581 A callback that gets any typed keys while a popup is displayed. The filter is | 578 A callback that gets any typed keys while a popup is displayed. The filter is |
629 result, which could be an index in the popup lines, or whatever was passed as | 626 result, which could be an index in the popup lines, or whatever was passed as |
630 the second argument of `popup_close()`. | 627 the second argument of `popup_close()`. |
631 | 628 |
632 If the popup is force-closed, e.g. because the cursor moved or CTRL-C was | 629 If the popup is force-closed, e.g. because the cursor moved or CTRL-C was |
633 pressed, the number -1 is passed to the callback. | 630 pressed, the number -1 is passed to the callback. |
631 | |
632 | |
633 POPUP MASK *popup-mask* | |
634 | |
635 To minimize the text that the popup covers, parts of it can be made | |
636 transparent. This is defined by a "mask" which is a list of lists, where each | |
637 list has four numbers: | |
638 col start column, positive for counting from the left, 1 for | |
639 leftmost, negative for counting from the right, -1 for | |
640 rightmost | |
641 endcol last column, like "col" | |
642 line start line, positive for conting from the top, 1 for top, | |
643 negative for counting from the bottom, -1 for bottom | |
644 endline end line, like "line" | |
645 | |
646 For example, to make the last 10 columns of the last line transparent: | |
647 [[-10, -1, -1, -1]] | |
648 | |
649 To make the four corners transparent: | |
650 [[1, 1, 1, 1], [-1, -1, 1, 1], [1, 1, -1, -1], [-1, -1, -1, -1]] | |
634 | 651 |
635 ============================================================================== | 652 ============================================================================== |
636 3. Examples *popup-examples* | 653 3. Examples *popup-examples* |
637 | 654 |
638 TODO | 655 TODO |