patch 9.1.0983: not able to get the displayed items in complete_info()
Problem: not able to get the displayed items in complete_info()
(Evgeni Chasnovski)
Solution: return the visible items via the "matches" key for
complete_info() (glepnir)
fixes: #10007
closes: #16307
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
34e271b321
commit
d4088edae2
@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 9.1. Last change: 2024 Dec 30
|
||||
*builtin.txt* For Vim version 9.1. Last change: 2024 Dec 31
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1896,10 +1896,15 @@ complete_info([{what}]) *complete_info()*
|
||||
See |complete_info_mode| for the values.
|
||||
pum_visible |TRUE| if popup menu is visible.
|
||||
See |pumvisible()|.
|
||||
items List of completion matches. Each item is a
|
||||
dictionary containing the entries "word",
|
||||
items List of all completion candidates. Each item
|
||||
is a dictionary containing the entries "word",
|
||||
"abbr", "menu", "kind", "info" and "user_data".
|
||||
See |complete-items|.
|
||||
matches Same as "items", but only returns items that
|
||||
are matching current query. If both "matches"
|
||||
and "items" are in "what", the returned list
|
||||
will still be named "items", but each item
|
||||
will have an additional "match" field.
|
||||
selected Selected item index. First index is zero.
|
||||
Index is -1 if no item is selected (showing
|
||||
typed text only, or the last completion after
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 9.1. Last change: 2024 Dec 28
|
||||
*insert.txt* For Vim version 9.1. Last change: 2024 Dec 31
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1195,6 +1195,7 @@ items:
|
||||
|hl-PmenuKind| highlight group, allowing for the
|
||||
customization of ctermfg and guifg properties for the
|
||||
completion kind
|
||||
match See "matches" in |complete_info()|.
|
||||
|
||||
All of these except "icase", "equal", "dup" and "empty" must be a string. If
|
||||
an item does not meet these requirements then an error message is given and
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
*version9.txt* For Vim version 9.1. Last change: 2024 Dec 30
|
||||
*version9.txt* For Vim version 9.1. Last change: 2024 Dec 31
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -41621,6 +41621,8 @@ Changed~
|
||||
instead of the "sh" filetype
|
||||
- the default value of the 'keyprotocol' option has been updated by support
|
||||
for the ghostty terminal emulator (using kitty protocol)
|
||||
- |complete_info()| returns the list of matches shown in the poppu menu via
|
||||
the "matches" key
|
||||
|
||||
*added-9.2*
|
||||
Added ~
|
||||
|
||||
Reference in New Issue
Block a user