diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2025-10-27 09:34:52 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-27 01:34:52 +0000 |
| commit | 155efabb1513ab1f5871d308eb8a2ae310e9e4ae (patch) | |
| tree | 9db703ddd3f0f0e602bfe557031981e8166bbda6 /runtime/lua/vim/_meta/vimfn.lua | |
| parent | fb6fd17f26a6abfecdf373c0e5f6dae66f07e0d8 (diff) | |
| download | rneovim-155efabb1513ab1f5871d308eb8a2ae310e9e4ae.tar.gz rneovim-155efabb1513ab1f5871d308eb8a2ae310e9e4ae.tar.bz2 rneovim-155efabb1513ab1f5871d308eb8a2ae310e9e4ae.zip | |
vim-patch:9.1.1876: pre-inserted text not exposed in complete_info() (#36342)
Problem: pre-inserted text not exposed in complete_info()
Solution: Add the pre-inserted text to the complete_info() Vim script
function (Girish Palya)
closes: vim/vim#18571
Feat: expose preinserted text in complete_info()
https://github.com/vim/vim/commit/ef5bf58d8cb2c6332d4cbc89c1d352466772ecc3
Co-authored-by: Girish Palya <girishji@gmail.com>
Diffstat (limited to 'runtime/lua/vim/_meta/vimfn.lua')
| -rw-r--r-- | runtime/lua/vim/_meta/vimfn.lua | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua index f44e4c16bf..da22aee620 100644 --- a/runtime/lua/vim/_meta/vimfn.lua +++ b/runtime/lua/vim/_meta/vimfn.lua @@ -1055,10 +1055,8 @@ function vim.fn.complete_check() end --- Returns a |Dictionary| with information about Insert mode --- completion. See |ins-completion|. --- The items are: ---- mode Current completion mode name string. ---- See |complete_info_mode| for the values. ---- pum_visible |TRUE| if popup menu is visible. ---- See |pumvisible()|. +--- completed Return a dictionary containing the entries of +--- the currently selected index item. --- items List of all completion candidates. Each item --- is a dictionary containing the entries "word", --- "abbr", "menu", "kind", "info" and @@ -1069,13 +1067,18 @@ function vim.fn.complete_check() end --- and "items" are in "what", the returned list --- will still be named "items", but each item --- will have an additional "match" field. +--- mode Current completion mode name string. +--- See |complete_info_mode| for the values. +--- preinserted_text +--- The actual text that is pre-inserted, see +--- |preinserted()|. +--- pum_visible |TRUE| if popup menu is visible. +--- See |pumvisible()|. --- selected Selected item index. First index is zero. --- Index is -1 if no item is selected (showing --- typed text only, or the last completion after --- no item is selected when using the <Up> or --- <Down> keys) ---- completed Return a dictionary containing the entries of ---- the currently selected index item. --- preview_winid Info floating preview window id. --- preview_bufnr Info floating preview buffer id. --- |