forked from aniani/vim
patch 8.1.1875: cannot get size and position of the popup menu
Problem: Cannot get size and position of the popup menu. Solution: Add pum_getpos(). (Ben Jackson, closes #4827)
This commit is contained in:
@@ -595,6 +595,10 @@ CompleteChanged *CompleteChanged*
|
||||
scrollbar TRUE if visible
|
||||
|
||||
It is not allowed to change the text |textlock|.
|
||||
|
||||
The size and position of the popup are also
|
||||
available by calling |pum_getpos()|.
|
||||
|
||||
*CompleteDone*
|
||||
CompleteDone After Insert mode completion is done. Either
|
||||
when something was completed or abandoning
|
||||
|
||||
@@ -2613,6 +2613,7 @@ prop_type_delete({name} [, {props}])
|
||||
prop_type_get([{name} [, {props}])
|
||||
Dict get property type values
|
||||
prop_type_list([{props}]) List get list of property types
|
||||
pum_getpos() Dict position and size of pum if visible
|
||||
pumvisible() Number whether popup menu is visible
|
||||
pyeval({expr}) any evaluate |Python| expression
|
||||
py3eval({expr}) any evaluate |python3| expression
|
||||
@@ -3477,6 +3478,10 @@ complete_info([{what}])
|
||||
the items listed in {what} are returned. Unsupported items in
|
||||
{what} are silently ignored.
|
||||
|
||||
To get the position and size of the popup menu, see
|
||||
|pum_getpos()|. It's also available in |v:event| during the
|
||||
|CompleteChanged| event.
|
||||
|
||||
Examples: >
|
||||
" Get all items
|
||||
call complete_info()
|
||||
@@ -6977,6 +6982,20 @@ prompt_setprompt({buf}, {text}) *prompt_setprompt()*
|
||||
<
|
||||
prop_ functions are documented here: |text-prop-functions|.
|
||||
|
||||
pum_getpos() *pum_getpos()*
|
||||
If the popup menu (see |ins-completion-menu|) is not visible,
|
||||
returns an empty |Dictionary|, otherwise, returns a
|
||||
|Dictionary| with the following keys:
|
||||
height nr of items visible
|
||||
width screen cells
|
||||
row top screen row (0 first row)
|
||||
col leftmost screen column (0 first col)
|
||||
size total nr of items
|
||||
scrollbar |TRUE| if visible
|
||||
|
||||
The values are the same as in |v:event| during
|
||||
|CompleteChanged|.
|
||||
|
||||
pumvisible() *pumvisible()*
|
||||
Returns non-zero when the popup menu is visible, zero
|
||||
otherwise. See |ins-completion-menu|.
|
||||
|
||||
Reference in New Issue
Block a user