mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 13:38:34 +00:00
vim-patch:9.1.1509: patch 9.1.1505 was not good
Problem: Patch 9.1.1505 was not good
Solution: Revert "patch 9.1.1505: not possible to return completion type
for :ex command" and instead add the getcompletiontype()
function (Hirohito Higashi).
related: vim/vim#17606
closes: vim/vim#17662
96b3ef2389
Cherry-pick Test_multibyte_expression() from Vim, as it passes.
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
This commit is contained in:
@@ -3751,22 +3751,22 @@ M.funcs = {
|
||||
signature = 'getcmdcomplpat()',
|
||||
},
|
||||
getcmdcompltype = {
|
||||
args = { 0, 1 },
|
||||
base = 1,
|
||||
desc = [=[
|
||||
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_=|.
|
||||
|
||||
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_=|.
|
||||
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.
|
||||
|
||||
To get the type of the command-line completion for the
|
||||
specified string, use |getcompletiontype()|.
|
||||
]=],
|
||||
name = 'getcmdcompltype',
|
||||
params = { { 'pat', 'string' } },
|
||||
params = {},
|
||||
returns = 'string',
|
||||
signature = 'getcmdcompltype([{pat}])',
|
||||
signature = 'getcmdcompltype()',
|
||||
},
|
||||
getcmdline = {
|
||||
desc = [=[
|
||||
@@ -3943,6 +3943,21 @@ M.funcs = {
|
||||
returns = 'string[]',
|
||||
signature = 'getcompletion({pat}, {type} [, {filtered}])',
|
||||
},
|
||||
getcompletiontype = {
|
||||
args = 1,
|
||||
base = 1,
|
||||
desc = [=[
|
||||
Return the type of the command-line completion using {pat}.
|
||||
When no corresponding completion type is found, an empty
|
||||
string is returned.
|
||||
To get the current command-line completion type, use
|
||||
|getcmdcompltype()|.
|
||||
]=],
|
||||
name = 'getcompletiontype',
|
||||
params = { { 'pat', 'string' } },
|
||||
returns = 'string',
|
||||
signature = 'getcompletiontype({pat})',
|
||||
},
|
||||
getcurpos = {
|
||||
args = { 0, 1 },
|
||||
base = 1,
|
||||
|
Reference in New Issue
Block a user