From 9f33b69cfdf330a6c89cd107074e6f28070bdda0 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 2 Oct 2025 11:13:03 +0800 Subject: [PATCH] vim-patch:cfcf1a5: runtime(doc): Clarify use of "noselect" in 'completeopt' closes: vim/vim#18452 https://github.com/vim/vim/commit/cfcf1a57cbef90831c26626aee6ba9491fb85cb3 Co-authored-by: Girish Palya Co-authored-by: Tomasz N --- runtime/doc/options.txt | 4 +++- runtime/lua/vim/_meta/options.lua | 4 +++- src/nvim/options.lua | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index b80b117b3f..9e4d14d390 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1674,7 +1674,9 @@ A jump table for the options with a short description can be found at |Q_op|. noselect Same as "noinsert", except that no menu item is pre-selected. If both "noinsert" and "noselect" are - present, "noselect" has precedence. + present, "noselect" takes precedence. This options is + enabled automatically when 'autocomplete' is on, unless + "preinsert" is also enabled. nosort Disable sorting of completion candidates based on fuzzy scores when "fuzzy" is enabled. Candidates will appear diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 20f7f1b7cb..b82b6693e2 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -1219,7 +1219,9 @@ vim.go.cia = vim.go.completeitemalign --- --- noselect Same as "noinsert", except that no menu item is --- pre-selected. If both "noinsert" and "noselect" are ---- present, "noselect" has precedence. +--- present, "noselect" takes precedence. This options is +--- enabled automatically when 'autocomplete' is on, unless +--- "preinsert" is also enabled. --- --- nosort Disable sorting of completion candidates based on fuzzy --- scores when "fuzzy" is enabled. Candidates will appear diff --git a/src/nvim/options.lua b/src/nvim/options.lua index a396ef912a..cba887ff41 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -1699,7 +1699,9 @@ local options = { noselect Same as "noinsert", except that no menu item is pre-selected. If both "noinsert" and "noselect" are - present, "noselect" has precedence. + present, "noselect" takes precedence. This options is + enabled automatically when 'autocomplete' is on, unless + "preinsert" is also enabled. nosort Disable sorting of completion candidates based on fuzzy scores when "fuzzy" is enabled. Candidates will appear