vim-patch:9.1.0983: not able to get the displayed items in complete_i… (#31796)

vim-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: vim/vim#10007
closes: vim/vim#16307

d4088edae2
This commit is contained in:
glepnir
2024-12-31 19:12:50 +08:00
committed by GitHub
parent 57f10abbc2
commit bdc0b5f505
6 changed files with 84 additions and 11 deletions

View File

@ -1384,10 +1384,15 @@ M.funcs = {
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