Mercurial > vim
comparison runtime/doc/popup.txt @ 17429:6e756ad5ef1a v8.1.1713
patch 8.1.1713: highlighting cursor line only works with popup_menu()
commit https://github.com/vim/vim/commit/df9c6cad8cc318e26e99c3b055f0788e7d6582de
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 18 13:46:42 2019 +0200
patch 8.1.1713: highlighting cursor line only works with popup_menu()
Problem: Highlighting cursor line only works with popup_menu().
Solution: Add the "cursorline" property. (Naruhiko Nishino, closes https://github.com/vim/vim/issues/4671)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 18 Jul 2019 14:00:08 +0200 |
parents | 40417757dffd |
children | ca8e754bdd53 |
comparison
equal
deleted
inserted
replaced
17428:30036b80e5ca | 17429:6e756ad5ef1a |
---|---|
301 | 301 |
302 "border" and "padding" are not included when all values are | 302 "border" and "padding" are not included when all values are |
303 zero. When all values are one then an empty list is included. | 303 zero. When all values are one then an empty list is included. |
304 | 304 |
305 "borderhighlight" is not included when all values are empty. | 305 "borderhighlight" is not included when all values are empty. |
306 "scrollbarhighlight" and "thumbhighlight" are onlu included | 306 "scrollbarhighlight" and "thumbhighlight" are only included |
307 when set. | 307 when set. |
308 | 308 |
309 "tabpage" will be -1 for a global popup, zero for a popup on | 309 "tabpage" will be -1 for a global popup, zero for a popup on |
310 the current tabpage and a positive number for a popup on | 310 the current tabpage and a positive number for a popup on |
311 another tabpage. | 311 another tabpage. |
343 If window {id} does not exist nothing happens. If window {id} | 343 If window {id} does not exist nothing happens. If window {id} |
344 exists but is not a popup window an error is given. *E993* | 344 exists but is not a popup window an error is given. *E993* |
345 | 345 |
346 | 346 |
347 popup_locate({row}, {col}) *popup_locate()* | 347 popup_locate({row}, {col}) *popup_locate()* |
348 Return the |window-ID| of the popup at screen positoin {row} | 348 Return the |window-ID| of the popup at screen position {row} |
349 and {col}. If there are multiple popups the one with the | 349 and {col}. If there are multiple popups the one with the |
350 highest zindex is returned. If there are no popups at this | 350 highest zindex is returned. If there are no popups at this |
351 position then zero is returned. | 351 position then zero is returned. |
352 | 352 |
353 | 353 |
360 \ pos: 'center', | 360 \ pos: 'center', |
361 \ zindex: 200, | 361 \ zindex: 200, |
362 \ drag: 1, | 362 \ drag: 1, |
363 \ wrap: 0, | 363 \ wrap: 0, |
364 \ border: [], | 364 \ border: [], |
365 \ cursorline: 1, | |
365 \ padding: [0,1,0,1], | 366 \ padding: [0,1,0,1], |
366 \ filter: 'popup_filter_menu', | 367 \ filter: 'popup_filter_menu', |
367 \ }) | 368 \ }) |
368 < The current line is highlighted with a match using | 369 < The current line is highlighted with a match using |
369 "PopupSelected", or "PmenuSel" if that is not defined. | 370 "PopupSelected", or "PmenuSel" if that is not defined. |
427 borderchars | 428 borderchars |
428 borderhighlight | 429 borderhighlight |
429 callback | 430 callback |
430 close | 431 close |
431 drag | 432 drag |
433 cursorline | |
432 filter | 434 filter |
433 firstline | 435 firstline |
434 flip | 436 flip |
435 highlight | 437 highlight |
436 mask | 438 mask |
596 - "expr": if the cursor moved outside |<cexpr>| | 598 - "expr": if the cursor moved outside |<cexpr>| |
597 - [{start}, {end}]: if the cursor moved before column | 599 - [{start}, {end}]: if the cursor moved before column |
598 {start} or after {end} | 600 {start} or after {end} |
599 The popup also closes if the cursor moves to another | 601 The popup also closes if the cursor moves to another |
600 line or to another window. | 602 line or to another window. |
603 cursorline non-zero: Highlight the cursor line. Also scrolls the | |
604 text to show this line (only works properly | |
605 when 'wrap' is off). | |
606 zero: Do not highlight the cursor line. | |
607 Default is zero, except for |popup_menu()|. | |
601 filter A callback that can filter typed characters, see | 608 filter A callback that can filter typed characters, see |
602 |popup-filter|. | 609 |popup-filter|. |
603 callback A callback that is called when the popup closes, e.g. | 610 callback A callback that is called when the popup closes, e.g. |
604 when using |popup_filter_menu()|, see |popup-callback|. | 611 when using |popup_filter_menu()|, see |popup-callback|. |
605 | 612 |
693 | 700 |
694 If the text does not fit in the popup a scrollbar is displayed on the right of | 701 If the text does not fit in the popup a scrollbar is displayed on the right of |
695 the window. This can be disabled by setting the "scrollbar" option to zero. | 702 the window. This can be disabled by setting the "scrollbar" option to zero. |
696 When the scrollbar is displayed mouse scroll events, while the mouse pointer | 703 When the scrollbar is displayed mouse scroll events, while the mouse pointer |
697 is on the popup, will cause the text to scroll up or down as you would expect. | 704 is on the popup, will cause the text to scroll up or down as you would expect. |
698 A click in the upper halve of the scrollbar will scroll the text one line | 705 A click in the upper half of the scrollbar will scroll the text one line |
699 down. A click in the lower halve wil scroll the text one line up. However, | 706 down. A click in the lower half wil scroll the text one line up. However, |
700 this is limited so that the popup does not get smaller. | 707 this is limited so that the popup does not get smaller. |
701 | 708 |
702 | 709 |
703 POPUP MASK *popup-mask* | 710 POPUP MASK *popup-mask* |
704 | 711 |
707 list has four numbers: | 714 list has four numbers: |
708 col start column, positive for counting from the left, 1 for | 715 col start column, positive for counting from the left, 1 for |
709 leftmost, negative for counting from the right, -1 for | 716 leftmost, negative for counting from the right, -1 for |
710 rightmost | 717 rightmost |
711 endcol last column, like "col" | 718 endcol last column, like "col" |
712 line start line, positive for conting from the top, 1 for top, | 719 line start line, positive for counting from the top, 1 for top, |
713 negative for counting from the bottom, -1 for bottom | 720 negative for counting from the bottom, -1 for bottom |
714 endline end line, like "line" | 721 endline end line, like "line" |
715 | 722 |
716 For example, to make the last 10 columns of the last line transparent: | 723 For example, to make the last 10 columns of the last line transparent: |
717 [[-10, -1, -1, -1]] | 724 [[-10, -1, -1, -1]] |