diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-10-09 08:14:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-09 08:14:18 +0800 |
commit | f449a38f6a47bee30f0d4e291d8234d1ac8288a7 (patch) | |
tree | e65db9b696571e64352b16f849b8cc7582183f8c /runtime/lua/vim | |
parent | e98b1b0235a5e817c00814549606631703ab2041 (diff) | |
download | rneovim-f449a38f6a47bee30f0d4e291d8234d1ac8288a7.tar.gz rneovim-f449a38f6a47bee30f0d4e291d8234d1ac8288a7.tar.bz2 rneovim-f449a38f6a47bee30f0d4e291d8234d1ac8288a7.zip |
vim-patch:9.1.0770: current command line completion is a bit limited (#30728)
Problem: current command completion is a bit limited
Solution: Add the shellcmdline completion type and getmdcomplpat()
function (Ruslan Russkikh).
closes: vim/vim#15823
https://github.com/vim/vim/commit/0407d621bbad020b840ffbbbd25ba023bbc05edd
Co-authored-by: Ruslan Russkikh <dvrussk@yandex.ru>
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r-- | runtime/lua/vim/_meta/vimfn.lua | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua index 3f6deba092..1e1e87fca8 100644 --- a/runtime/lua/vim/_meta/vimfn.lua +++ b/runtime/lua/vim/_meta/vimfn.lua @@ -2879,12 +2879,22 @@ function vim.fn.getcharsearch() end --- @return string function vim.fn.getcharstr(expr) end +--- Return completion pattern of the current command-line. +--- Only works when the command line is being edited, thus +--- requires use of |c_CTRL-\_e| or |c_CTRL-R_=|. +--- Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()|, +--- |getcmdprompt()|, |getcmdcompltype()| and |setcmdline()|. +--- Returns an empty string when completion is not defined. +--- +--- @return string +function vim.fn.getcmdcomplpat() end + --- 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()| and |setcmdline()|. +--- |getcmdprompt()|, |getcmdcomplpat()| and |setcmdline()|. --- Returns an empty string when completion is not defined. --- --- @return string |