mirror of
https://github.com/neovim/neovim.git
synced 2026-08-27 09:31:47 +00:00
vim-patch:9.2.1004: a completion function cannot tell why it was called (#41500)
Problem: A function used through 'omnifunc' or 'complete' is called the
same way whether 'autocomplete' started the completion or a
key asked for one, so it cannot answer differently.
Solution: Report which of the two it is in complete_info() as "auto". It
is returned only when asked for in {what}, so what
complete_info() says by itself does not change
(Hirohito Higashi).
closes: vim/vim#21143
1f56c351de
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
This commit is contained in:
6
runtime/lua/vim/_meta/vimfn.gen.lua
generated
6
runtime/lua/vim/_meta/vimfn.gen.lua
generated
@@ -1135,6 +1135,12 @@ function vim.fn.complete_check() end
|
||||
--- Returns a |Dictionary| with information about Insert mode
|
||||
--- completion. See |ins-completion|.
|
||||
--- The items are:
|
||||
--- auto |TRUE| when Vim started this completion by
|
||||
--- itself, which is what 'autocomplete' does,
|
||||
--- and |FALSE| when a key asked for it, such as
|
||||
--- |i_CTRL-X_CTRL-O|. A |complete-functions|
|
||||
--- function can read this to tell the two apart.
|
||||
--- Returned only when asked for in {what}.
|
||||
--- completed Return a dictionary containing the entries of
|
||||
--- the currently selected index item.
|
||||
--- items List of all completion candidates. Each item
|
||||
|
||||
Reference in New Issue
Block a user