From 155efabb1513ab1f5871d308eb8a2ae310e9e4ae Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 27 Oct 2025 09:34:52 +0800 Subject: 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 --- src/nvim/eval.lua | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/nvim/eval.lua') diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 34804c231e..1fa2d2094a 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -1420,10 +1420,8 @@ M.funcs = { 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 @@ -1434,13 +1432,18 @@ M.funcs = { 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 or 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. -- cgit