mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 13:38:34 +00:00
vim-patch:9.1.1505: not possible to return completion type for :ex command
Problem: not possible to return command-line completion type for :ex
command
Solution: make getcmdcompltype() accept an optional and return the
command-line completion for that arg (Shougo Matsushita).
closes: vim/vim#17606
5d2354fc07
Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
This commit is contained in:
@@ -3751,19 +3751,22 @@ M.funcs = {
|
||||
signature = 'getcmdcomplpat()',
|
||||
},
|
||||
getcmdcompltype = {
|
||||
args = { 0, 1 },
|
||||
base = 1,
|
||||
desc = [=[
|
||||
Return the type of the current command-line completion.
|
||||
Only works when the command line is being edited, thus
|
||||
requires use of |c_CTRL-\_e| or |c_CTRL-R_=|.
|
||||
Return the type of command-line completion using {pat}.
|
||||
If {pat} is omited, only works when the command line is being
|
||||
edited, thus requires use of |c_CTRL-\_e| or |c_CTRL-R_=|.
|
||||
|
||||
See |:command-completion| for the return string.
|
||||
Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()|,
|
||||
|getcmdprompt()|, |getcmdcomplpat()| and |setcmdline()|.
|
||||
Returns an empty string when completion is not defined.
|
||||
]=],
|
||||
name = 'getcmdcompltype',
|
||||
params = {},
|
||||
params = { { 'pat', 'string' } },
|
||||
returns = 'string',
|
||||
signature = 'getcmdcompltype()',
|
||||
signature = 'getcmdcompltype([{pat}])',
|
||||
},
|
||||
getcmdline = {
|
||||
desc = [=[
|
||||
|
Reference in New Issue
Block a user