mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +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:
23
runtime/lua/vim/_meta/vimfn.lua
generated
23
runtime/lua/vim/_meta/vimfn.lua
generated
@ -2994,18 +2994,19 @@ function vim.fn.getcharstr(expr, opts) end
|
||||
--- @return string
|
||||
function vim.fn.getcmdcomplpat() end
|
||||
|
||||
--- 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.
|
||||
---
|
||||
--- @param pat? string
|
||||
--- To get the type of the command-line completion for the
|
||||
--- specified string, use |getcompletiontype()|.
|
||||
---
|
||||
--- @return string
|
||||
function vim.fn.getcmdcompltype(pat) end
|
||||
function vim.fn.getcmdcompltype() end
|
||||
|
||||
--- Return the current command-line input. Only works when the
|
||||
--- command line is being edited, thus requires use of
|
||||
@ -3154,6 +3155,16 @@ function vim.fn.getcmdwintype() end
|
||||
--- @return string[]
|
||||
function vim.fn.getcompletion(pat, type, filtered) end
|
||||
|
||||
--- 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()|.
|
||||
---
|
||||
--- @param pat string
|
||||
--- @return string
|
||||
function vim.fn.getcompletiontype(pat) end
|
||||
|
||||
--- Get the position of the cursor. This is like getpos('.'), but
|
||||
--- includes an extra "curswant" item in the list:
|
||||
--- [0, lnum, col, off, curswant] ~
|
||||
|
Reference in New Issue
Block a user