vim-patch:9.2.0417: completion: no support for "noinsert" with 'wildmode' (#39516)

Problem:  completion: no support for "noinsert" with 'wildmode' and
          commandline completion
Solution: Add "noinsert" value to the 'wildmode' option, mirroring
          'completeopt' "noinsert" behaviour (glepnir).

fixes:  vim/vim#16551
closes: vim/vim#20080

af494af5ff
This commit is contained in:
glepnir
2026-04-30 19:13:47 +08:00
committed by GitHub
parent 6195624a3f
commit c79d5f5028
8 changed files with 139 additions and 23 deletions

View File

@@ -10370,7 +10370,7 @@ local options = {
cb = 'did_set_wildmode',
defaults = 'full',
-- Keep this in sync with check_opt_wim().
values = { 'full', 'longest', 'list', 'lastused', 'noselect' },
values = { 'full', 'longest', 'list', 'lastused', 'noselect', 'noinsert' },
flags = true,
deny_duplicates = false,
desc = [=[
@@ -10396,8 +10396,12 @@ local options = {
applies to buffer name completion.
"noselect" If 'wildmenu' is enabled, show the menu but do not
preselect the first item.
If only one match exists, it is completed fully, unless "noselect" is
specified.
"noinsert" If 'wildmenu' is enabled, show the menu and preselect
the first match, but do not insert it in the
command line. If both "noinsert" and "noselect" are
present, "noselect" takes precedence.
If only one match exists, it is completed fully, unless "noselect" or
"noinsert" is specified.
Some useful combinations of colon-separated values:
"longest:full" Start with the longest common string and show