patch 9.1.1930: completion: 'completefuzzycollect' is too obscure

Commit: 
https://github.com/vim/vim/commit/33fbfe003c17ad25bf3903aaa89a55fe372086ba
Author: Girish Palya <[email protected]>
Date:   Wed Nov 26 21:00:16 2025 +0000

    patch 9.1.1930: completion: 'completefuzzycollect' is too obscure
    
    Problem:  completion: 'completefuzzycollect' option is too obscure
    Solution: Deprecate the option, but don't error out for existing scripts,
              behave like 'completefuzzycollect' is set when fuzzy
              completion is enabled (Girish Palya).
    
    fixes: #18498
    closes: #18788
    
    Signed-off-by: Girish Palya <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index c67a801ad..7d12c4f0e 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt*  For Vim version 9.1.  Last change: 2025 Nov 25
+*options.txt*  For Vim version 9.1.  Last change: 2025 Nov 26
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -2211,11 +2211,13 @@ A jump table for the options with a short description 
can be found at |Q_op|.
                                                *'completefuzzycollect'* *'cfc'*
 'completefuzzycollect' 'cfc'   string  (default: empty)
                                global
-       A comma-separated list of strings to enable fuzzy collection for
-       specific |ins-completion| modes, affecting how matches are gathered
-       during completion.  For specified modes, fuzzy matching is used to
-       find completion candidates instead of the standard prefix-based
-       matching.  This option can contain the following values:
+       DEPRECATED: This option is no longer used; changing it has no effect.
+       When 'completeopt' contains "fuzzy", Vim will internally use the
+       equivalent of:
+               "keyword,files,whole_line"
+
+       The values below are kept for compatibility and for scripts that
+       may read this option:
 
        keyword         keywords in the current file    |i_CTRL-X_CTRL-N|
                        keywords with flags ".", "w",   |i_CTRL-N| |i_CTRL-P|
@@ -2226,10 +2228,6 @@ A jump table for the options with a short description 
can be found at |Q_op|.
 
        whole_line      whole lines                     |i_CTRL-X_CTRL-L|
 
-       When using the 'completeopt' "longest" option value, fuzzy collection
-       can identify the longest common string among the best fuzzy matches
-       and insert it automatically.
-
                                                *'completeitemalign'* *'cia'*
 'completeitemalign' 'cia' string (default: "abbr,kind,menu")
                          global
diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt
index 78e6e3a21..8d47dbb6c 100644
--- a/runtime/doc/version9.txt
+++ b/runtime/doc/version9.txt
@@ -1,4 +1,4 @@
-*version9.txt* For Vim version 9.1.  Last change: 2025 Nov 20
+*version9.txt* For Vim version 9.1.  Last change: 2025 Nov 26
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -41878,8 +41878,6 @@ Options: ~
 'autocompletetimeout'  initial decay timeout for autocompletion algorithm
 'chistory'             Size of the quickfix stack |quickfix-stack|
 'clipmethod'           How to access the clipboard
-'completefuzzycollect' Enable fuzzy collection of candidates for (some)
-                       |ins-completion| modes
 'completeitemalign'    Order of |complete-items| in Insert mode completion
                        popup
 'completetimeout'      initial decay timeout for CTRL-N and CTRL-P
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index 1b982edca..52ef0514d 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -1,7 +1,7 @@
 " These commands create the option window.
 "
 " Maintainer:  The Vim Project <https://github.com/vim/vim>
-" Last Change: 2025 Nov 20
+" Last Change: 2025 Nov 26
 " Former Maintainer:   Bram Moolenaar <[email protected]>
 
 " If there already is an option window, jump to that one.
@@ -890,8 +890,6 @@ if has("insert_expand")
   call <SID>OptionL("cot")
   call <SID>AddOption("completeitemalign", gettext(" 
popup menu item align order"))
   call <SID>OptionG("cia", &cia)
-  call <SID>AddOption("completefuzzycollect", gettext(" 
use fuzzy collection for specific completion modes"))
-  call <SID>OptionL("cfc")
   if exists("+completepopup")
     call <SID>AddOption("completepopup", gettext("options for the Insert mode 
completion info popup"))
     call <SID>OptionG("cpp", &cpp)
diff --git a/runtime/syntax/generator/gen_syntax_vim.vim 
b/runtime/syntax/generator/gen_syntax_vim.vim
index 59e3354ee..d0f6faba1 100644
--- a/runtime/syntax/generator/gen_syntax_vim.vim
+++ b/runtime/syntax/generator/gen_syntax_vim.vim
@@ -1,7 +1,7 @@
 " Vim syntax file generator
 " Language:             Vim script
 " Maintainer:  Hirohito Higashi (h_east)
-" Last Change: 2025 Nov 21
+" Last Change: 2025 Nov 26
 
 let s:keepcpo= &cpo
 set cpo&vim
@@ -31,6 +31,9 @@ function s:parse_vim_option(opt, missing_opt, term_out_code)
 
                for line in getline(1, line('$'))
                        let list = matchlist(line, 
'^\s*{\s*"\(\w\+\)"\s*,\s*\%("\(\w\+\)"\|NULL\)\s*,\s*\%([^,]*\(P_BOOL\)[^,]*\|[^,]*\)\s*,\s*\([^,]*NULL\)\?.*')
+                       if list[1] == 'completefuzzycollect'
+                               continue
+                       endif
                        let item.name = list[1]
                        let item.short_name = list[2]
                        let item.is_bool = empty(list[3]) ? 0 : 1
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index f96c47078..747f8b52b 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -2,7 +2,7 @@
 " Language:       Vim script
 " Maintainer:     Hirohito Higashi <h.east.727 ATMARK gmail.com>
 "         Doug Kearns <[email protected]>
-" Last Change:    2025 Nov 21
+" Last Change:    2025 Nov 26
 " Former Maintainer: Charles E. Campbell
 
 " DO NOT CHANGE DIRECTLY.
@@ -65,12 +65,12 @@ syn keyword vimStdPlugin contained  Arguments Asm Break 
Cfilter Clear Continue Di
 " vimOptions are caught only when contained in a vimSet {{{2
 " GEN_SYN_VIM: vimOption normal, START_STR='syn keyword vimOption contained', 
END_STR='skipwhite nextgroup=vimSetEqual,vimSetMod'
 syn keyword vimOption contained al aleph ari allowrevins ambw ambiwidth arab 
arabic arshape arabicshape acd autochdir ac autocomplete acl autocompletedelay 
act autocompletetimeout ai autoindent ar autoread asd autoshelldir aw autowrite 
awa autowriteall bg background bs backspace bk backup bkc backupcopy bdir 
backupdir bex backupext bsk backupskip bdlay balloondelay beval ballooneval 
bevalterm balloonevalterm bexpr balloonexpr bo belloff bin binary bomb brk 
breakat bri breakindent briopt breakindentopt bsdir browsedir bh bufhidden bl 
buflisted bt buftype cmp casemap cdh cdhome cd cdpath cedit ccv charconvert chi 
chistory cin cindent cink cinkeys cino cinoptions cinsd cinscopedecls cinw 
cinwords cb clipboard cpm clipmethod ch cmdheight cwh cmdwinheight cc 
colorcolumn skipwhite nextgroup=vimSetEqual,vimSetMod
-syn keyword vimOption contained co columns com comments cms commentstring cp 
compatible cpt complete cfu completefunc cfc completefuzzycollect cia 
completeitemalign cot completeopt cpp completepopup csl completeslash cto 
completetimeout cocu concealcursor cole conceallevel cf confirm ci copyindent 
cpo cpoptions cm cryptmethod cspc cscopepathcomp csprg cscopeprg csqf 
cscopequickfix csre cscoperelative cst cscopetag csto cscopetagorder csverb 
cscopeverbose crb cursorbind cuc cursorcolumn cul cursorline culopt 
cursorlineopt debug def define deco delcombine dict dictionary diff dia 
diffanchors dex diffexpr dip diffopt dg digraph dir directory dy display ead 
eadirection ed edcompatible emo emoji enc encoding eof endoffile eol endofline 
ea equalalways ep equalprg eb errorbells skipwhite 
nextgroup=vimSetEqual,vimSetMod
-syn keyword vimOption contained ef errorfile efm errorformat ek esckeys ei 
eventignore eiw eventignorewin et expandtab ex exrc fenc fileencoding fencs 
fileencodings ff fileformat ffs fileformats fic fileignorecase ft filetype fcs 
fillchars ffu findfunc fixeol fixendofline fcl foldclose fdc foldcolumn fen 
foldenable fde foldexpr fdi foldignore fdl foldlevel fdls foldlevelstart fmr 
foldmarker fdm foldmethod fml foldminlines fdn foldnestmax fdo foldopen fdt 
foldtext fex formatexpr flp formatlistpat fo formatoptions fp formatprg fs 
fsync gd gdefault gfm grepformat gp grepprg gcr guicursor gfn guifont gfs 
guifontset gfw guifontwide ghr guiheadroom gli guiligatures go guioptions 
guipty gtl guitablabel gtt guitabtooltip hf helpfile hh helpheight hlg helplang 
hid hidden skipwhite nextgroup=vimSetEqual,vimSetMod
-syn keyword vimOption contained hl highlight hi history hk hkmap hkp hkmapp 
hls hlsearch icon iconstring ic ignorecase imaf imactivatefunc imak 
imactivatekey imc imcmdline imd imdisable imi iminsert ims imsearch imsf 
imstatusfunc imst imstyle inc include inex includeexpr is incsearch inde 
indentexpr indk indentkeys inf infercase im insertmode ise isexpand isf isfname 
isi isident isk iskeyword isp isprint js joinspaces jop jumpoptions key kmp 
keymap km keymodel kpc keyprotocol kp keywordprg lmap langmap lm langmenu lnr 
langnoremap lrm langremap ls laststatus lz lazyredraw lhi lhistory lbr 
linebreak lines lsp linespace lisp lop lispoptions lw lispwords list lcs 
listchars lpl loadplugins luadll magic mef makeef menc makeencoding mp makeprg 
mps matchpairs mat matchtime skipwhite nextgroup=vimSetEqual,vimSetMod
-syn keyword vimOption contained mco maxcombine mfd maxfuncdepth mmd 
maxmapdepth mm maxmem mmp maxmempattern mmt maxmemtot msc maxsearchcount mis 
menuitems mopt messagesopt msm mkspellmem ml modeline mle modelineexpr mls 
modelines ma modifiable mod modified more mouse mousef mousefocus mh mousehide 
mousem mousemodel mousemev mousemoveevent mouses mouseshape mouset mousetime 
mzq mzquantum mzschemedll mzschemegcdll nf nrformats nu number nuw numberwidth 
ofu omnifunc odev opendevice opfunc operatorfunc ost osctimeoutlen pp packpath 
para paragraphs paste pt pastetoggle pex patchexpr pm patchmode pa path perldll 
pi preserveindent pvh previewheight pvp previewpopup pvw previewwindow pdev 
printdevice penc printencoding pexpr printexpr pfn printfont pheader 
printheader skipwhite nextgroup=vimSetEqual,vimSetMod
-syn keyword vimOption contained pmbcs printmbcharset pmbfn printmbfont popt 
printoptions prompt pb pumborder ph pumheight pmw pummaxwidth pw pumwidth 
pythondll pythonhome pythonthreedll pythonthreehome pyx pyxversion qftf 
quickfixtextfunc qe quoteescape ro readonly rdt redrawtime re regexpengine rnu 
relativenumber remap rop renderoptions report rs restorescreen ri revins rl 
rightleft rlc rightleftcmd rubydll ru ruler ruf rulerformat rtp runtimepath scr 
scroll scb scrollbind scf scrollfocus sj scrolljump so scrolloff sbo scrollopt 
sect sections secure sel selection slm selectmode ssop sessionoptions sh shell 
shcf shellcmdflag sp shellpipe shq shellquote srr shellredir ssl shellslash 
stmp shelltemp st shelltype sxe shellxescape sxq shellxquote sr shiftround sw 
shiftwidth skipwhite nextgroup=vimSetEqual,vimSetMod
-syn keyword vimOption contained shm shortmess sn shortname sbr showbreak sc 
showcmd sloc showcmdloc sft showfulltag sm showmatch smd showmode stal 
showtabline stpl showtabpanel ss sidescroll siso sidescrolloff scl signcolumn 
scs smartcase si smartindent sta smarttab sms smoothscroll sts softtabstop 
spell spc spellcapcheck spf spellfile spl spelllang spo spelloptions sps 
spellsuggest sb splitbelow spk splitkeep spr splitright sol startofline stl 
statusline su suffixes sua suffixesadd swf swapfile sws swapsync swb switchbuf 
smc synmaxcol syn syntax tcl tabclose tal tabline tpm tabpagemax tpl tabpanel 
tplo tabpanelopt ts tabstop tbs tagbsearch tc tagcase tfu tagfunc tl taglength 
tr tagrelative tag tags tgst tagstack tcldll term tbidi termbidi tenc 
termencoding tgc termguicolors skipwhite nextgroup=vimSetEqual,vimSetMod
+syn keyword vimOption contained co columns com comments cms commentstring cp 
compatible cpt complete cfu completefunc cia completeitemalign cot completeopt 
cpp completepopup csl completeslash cto completetimeout cocu concealcursor cole 
conceallevel cf confirm ci copyindent cpo cpoptions cm cryptmethod cspc 
cscopepathcomp csprg cscopeprg csqf cscopequickfix csre cscoperelative cst 
cscopetag csto cscopetagorder csverb cscopeverbose crb cursorbind cuc 
cursorcolumn cul cursorline culopt cursorlineopt debug def define deco 
delcombine dict dictionary diff dia diffanchors dex diffexpr dip diffopt dg 
digraph dir directory dy display ead eadirection ed edcompatible emo emoji enc 
encoding eof endoffile eol endofline ea equalalways ep equalprg eb errorbells 
ef errorfile skipwhite nextgroup=vimSetEqual,vimSetMod
+syn keyword vimOption contained efm errorformat ek esckeys ei eventignore eiw 
eventignorewin et expandtab ex exrc fenc fileencoding fencs fileencodings ff 
fileformat ffs fileformats fic fileignorecase ft filetype fcs fillchars ffu 
findfunc fixeol fixendofline fcl foldclose fdc foldcolumn fen foldenable fde 
foldexpr fdi foldignore fdl foldlevel fdls foldlevelstart fmr foldmarker fdm 
foldmethod fml foldminlines fdn foldnestmax fdo foldopen fdt foldtext fex 
formatexpr flp formatlistpat fo formatoptions fp formatprg fs fsync gd gdefault 
gfm grepformat gp grepprg gcr guicursor gfn guifont gfs guifontset gfw 
guifontwide ghr guiheadroom gli guiligatures go guioptions guipty gtl 
guitablabel gtt guitabtooltip hf helpfile hh helpheight hlg helplang hid hidden 
hl highlight skipwhite nextgroup=vimSetEqual,vimSetMod
+syn keyword vimOption contained hi history hk hkmap hkp hkmapp hls hlsearch 
icon iconstring ic ignorecase imaf imactivatefunc imak imactivatekey imc 
imcmdline imd imdisable imi iminsert ims imsearch imsf imstatusfunc imst 
imstyle inc include inex includeexpr is incsearch inde indentexpr indk 
indentkeys inf infercase im insertmode ise isexpand isf isfname isi isident isk 
iskeyword isp isprint js joinspaces jop jumpoptions key kmp keymap km keymodel 
kpc keyprotocol kp keywordprg lmap langmap lm langmenu lnr langnoremap lrm 
langremap ls laststatus lz lazyredraw lhi lhistory lbr linebreak lines lsp 
linespace lisp lop lispoptions lw lispwords list lcs listchars lpl loadplugins 
luadll magic mef makeef menc makeencoding mp makeprg mps matchpairs mat 
matchtime mco maxcombine skipwhite nextgroup=vimSetEqual,vimSetMod
+syn keyword vimOption contained mfd maxfuncdepth mmd maxmapdepth mm maxmem mmp 
maxmempattern mmt maxmemtot msc maxsearchcount mis menuitems mopt messagesopt 
msm mkspellmem ml modeline mle modelineexpr mls modelines ma modifiable mod 
modified more mouse mousef mousefocus mh mousehide mousem mousemodel mousemev 
mousemoveevent mouses mouseshape mouset mousetime mzq mzquantum mzschemedll 
mzschemegcdll nf nrformats nu number nuw numberwidth ofu omnifunc odev 
opendevice opfunc operatorfunc ost osctimeoutlen pp packpath para paragraphs 
paste pt pastetoggle pex patchexpr pm patchmode pa path perldll pi 
preserveindent pvh previewheight pvp previewpopup pvw previewwindow pdev 
printdevice penc printencoding pexpr printexpr pfn printfont pheader 
printheader pmbcs printmbcharset skipwhite nextgroup=vimSetEqual,vimSetMod
+syn keyword vimOption contained pmbfn printmbfont popt printoptions prompt pb 
pumborder ph pumheight pmw pummaxwidth pw pumwidth pythondll pythonhome 
pythonthreedll pythonthreehome pyx pyxversion qftf quickfixtextfunc qe 
quoteescape ro readonly rdt redrawtime re regexpengine rnu relativenumber remap 
rop renderoptions report rs restorescreen ri revins rl rightleft rlc 
rightleftcmd rubydll ru ruler ruf rulerformat rtp runtimepath scr scroll scb 
scrollbind scf scrollfocus sj scrolljump so scrolloff sbo scrollopt sect 
sections secure sel selection slm selectmode ssop sessionoptions sh shell shcf 
shellcmdflag sp shellpipe shq shellquote srr shellredir ssl shellslash stmp 
shelltemp st shelltype sxe shellxescape sxq shellxquote sr shiftround sw 
shiftwidth shm shortmess skipwhite nextgroup=vimSetEqual,vimSetMod
+syn keyword vimOption contained sn shortname sbr showbreak sc showcmd sloc 
showcmdloc sft showfulltag sm showmatch smd showmode stal showtabline stpl 
showtabpanel ss sidescroll siso sidescrolloff scl signcolumn scs smartcase si 
smartindent sta smarttab sms smoothscroll sts softtabstop spell spc 
spellcapcheck spf spellfile spl spelllang spo spelloptions sps spellsuggest sb 
splitbelow spk splitkeep spr splitright sol startofline stl statusline su 
suffixes sua suffixesadd swf swapfile sws swapsync swb switchbuf smc synmaxcol 
syn syntax tcl tabclose tal tabline tpm tabpagemax tpl tabpanel tplo 
tabpanelopt ts tabstop tbs tagbsearch tc tagcase tfu tagfunc tl taglength tr 
tagrelative tag tags tgst tagstack tcldll term tbidi termbidi tenc termencoding 
tgc termguicolors skipwhite nextgroup=vimSetEqual,vimSetMod
 syn keyword vimOption contained twk termwinkey twsl termwinscroll tws 
termwinsize twt termwintype terse ta textauto tx textmode tw textwidth tsr 
thesaurus tsrfu thesaurusfunc top tildeop to timeout tm timeoutlen title 
titlelen titleold titlestring tb toolbar tbis toolbariconsize ttimeout ttm 
ttimeoutlen tbi ttybuiltin tf ttyfast ttym ttymouse tsl ttyscroll tty ttytype 
udir undodir udf undofile ul undolevels ur undoreload uc updatecount ut 
updatetime vsts varsofttabstop vts vartabstop vbs verbose vfile verbosefile 
vdir viewdir vop viewoptions vi viminfo vif viminfofile ve virtualedit vb 
visualbell warn wiv weirdinvert ww whichwrap wc wildchar wcm wildcharm wig 
wildignore wic wildignorecase wmnu wildmenu wim wildmode wop wildoptions wak 
winaltkeys wcr wincolor wi window skipwhite nextgroup=vimSetEqual,vimSetMod
 syn keyword vimOption contained wfb winfixbuf wfh winfixheight wfw winfixwidth 
wh winheight wmh winminheight wmw winminwidth winptydll wiw winwidth wse wlseat 
wst wlsteal wtm wltimeoutlen wrap wm wrapmargin ws wrapscan write wa writeany 
wb writebackup wd writedelay xtermcodes skipwhite 
nextgroup=vimSetEqual,vimSetMod
 
@@ -104,14 +104,14 @@ syn match   vimOption contained   "t_k;"
 " vimOptions: These are the variable names {{{2
 " GEN_SYN_VIM: vimOption normal variable,           START_STR='syn keyword 
vimOptionVarName contained', END_STR=''
 syn keyword vimOptionVarName contained al aleph ari allowrevins ambw ambiwidth 
arab arabic arshape arabicshape acd autochdir ac autocomplete acl 
autocompletedelay act autocompletetimeout ai autoindent ar autoread asd 
autoshelldir aw autowrite awa autowriteall bg background bs backspace bk backup 
bkc backupcopy bdir backupdir bex backupext bsk backupskip bdlay balloondelay 
beval ballooneval bevalterm balloonevalterm bexpr balloonexpr bo belloff bin 
binary bomb brk breakat bri breakindent briopt breakindentopt bsdir browsedir 
bh bufhidden bl buflisted bt buftype cmp casemap cdh cdhome cd cdpath cedit ccv 
charconvert chi chistory cin cindent cink cinkeys cino cinoptions cinsd 
cinscopedecls cinw cinwords cb clipboard cpm clipmethod ch cmdheight cwh 
cmdwinheight cc colorcolumn
-syn keyword vimOptionVarName contained co columns com comments cms 
commentstring cp compatible cpt complete cfu completefunc cfc 
completefuzzycollect cia completeitemalign cot completeopt cpp completepopup 
csl completeslash cto completetimeout cocu concealcursor cole conceallevel cf 
confirm ci copyindent cpo cpoptions cm cryptmethod cspc cscopepathcomp csprg 
cscopeprg csqf cscopequickfix csre cscoperelative cst cscopetag csto 
cscopetagorder csverb cscopeverbose crb cursorbind cuc cursorcolumn cul 
cursorline culopt cursorlineopt debug def define deco delcombine dict 
dictionary diff dia diffanchors dex diffexpr dip diffopt dg digraph dir 
directory dy display ead eadirection ed edcompatible emo emoji enc encoding eof 
endoffile eol endofline ea equalalways ep equalprg
-syn keyword vimOptionVarName contained eb errorbells ef errorfile efm 
errorformat ek esckeys ei eventignore eiw eventignorewin et expandtab ex exrc 
fenc fileencoding fencs fileencodings ff fileformat ffs fileformats fic 
fileignorecase ft filetype fcs fillchars ffu findfunc fixeol fixendofline fcl 
foldclose fdc foldcolumn fen foldenable fde foldexpr fdi foldignore fdl 
foldlevel fdls foldlevelstart fmr foldmarker fdm foldmethod fml foldminlines 
fdn foldnestmax fdo foldopen fdt foldtext fex formatexpr flp formatlistpat fo 
formatoptions fp formatprg fs fsync gd gdefault gfm grepformat gp grepprg gcr 
guicursor gfn guifont gfs guifontset gfw guifontwide ghr guiheadroom gli 
guiligatures go guioptions guipty gtl guitablabel gtt guitabtooltip hf helpfile 
hh helpheight
-syn keyword vimOptionVarName contained hlg helplang hid hidden hl highlight hi 
history hk hkmap hkp hkmapp hls hlsearch icon iconstring ic ignorecase imaf 
imactivatefunc imak imactivatekey imc imcmdline imd imdisable imi iminsert ims 
imsearch imsf imstatusfunc imst imstyle inc include inex includeexpr is 
incsearch inde indentexpr indk indentkeys inf infercase im insertmode ise 
isexpand isf isfname isi isident isk iskeyword isp isprint js joinspaces jop 
jumpoptions key kmp keymap km keymodel kpc keyprotocol kp keywordprg lmap 
langmap lm langmenu lnr langnoremap lrm langremap ls laststatus lz lazyredraw 
lhi lhistory lbr linebreak lines lsp linespace lisp lop lispoptions lw 
lispwords list lcs listchars lpl loadplugins luadll magic mef makeef menc 
makeencoding mp makeprg
-syn keyword vimOptionVarName contained mps matchpairs mat matchtime mco 
maxcombine mfd maxfuncdepth mmd maxmapdepth mm maxmem mmp maxmempattern mmt 
maxmemtot msc maxsearchcount mis menuitems mopt messagesopt msm mkspellmem ml 
modeline mle modelineexpr mls modelines ma modifiable mod modified more mouse 
mousef mousefocus mh mousehide mousem mousemodel mousemev mousemoveevent mouses 
mouseshape mouset mousetime mzq mzquantum mzschemedll mzschemegcdll nf 
nrformats nu number nuw numberwidth ofu omnifunc odev opendevice opfunc 
operatorfunc ost osctimeoutlen pp packpath para paragraphs paste pt pastetoggle 
pex patchexpr pm patchmode pa path perldll pi preserveindent pvh previewheight 
pvp previewpopup pvw previewwindow pdev printdevice penc printencoding pexpr 
printexpr
-syn keyword vimOptionVarName contained pfn printfont pheader printheader pmbcs 
printmbcharset pmbfn printmbfont popt printoptions prompt pb pumborder ph 
pumheight pmw pummaxwidth pw pumwidth pythondll pythonhome pythonthreedll 
pythonthreehome pyx pyxversion qftf quickfixtextfunc qe quoteescape ro readonly 
rdt redrawtime re regexpengine rnu relativenumber remap rop renderoptions 
report rs restorescreen ri revins rl rightleft rlc rightleftcmd rubydll ru 
ruler ruf rulerformat rtp runtimepath scr scroll scb scrollbind scf scrollfocus 
sj scrolljump so scrolloff sbo scrollopt sect sections secure sel selection slm 
selectmode ssop sessionoptions sh shell shcf shellcmdflag sp shellpipe shq 
shellquote srr shellredir ssl shellslash stmp shelltemp st shelltype sxe 
shellxescape
-syn keyword vimOptionVarName contained sxq shellxquote sr shiftround sw 
shiftwidth shm shortmess sn shortname sbr showbreak sc showcmd sloc showcmdloc 
sft showfulltag sm showmatch smd showmode stal showtabline stpl showtabpanel ss 
sidescroll siso sidescrolloff scl signcolumn scs smartcase si smartindent sta 
smarttab sms smoothscroll sts softtabstop spell spc spellcapcheck spf spellfile 
spl spelllang spo spelloptions sps spellsuggest sb splitbelow spk splitkeep spr 
splitright sol startofline stl statusline su suffixes sua suffixesadd swf 
swapfile sws swapsync swb switchbuf smc synmaxcol syn syntax tcl tabclose tal 
tabline tpm tabpagemax tpl tabpanel tplo tabpanelopt ts tabstop tbs tagbsearch 
tc tagcase tfu tagfunc tl taglength tr tagrelative tag tags tgst tagstack
-syn keyword vimOptionVarName contained tcldll term tbidi termbidi tenc 
termencoding tgc termguicolors twk termwinkey twsl termwinscroll tws 
termwinsize twt termwintype terse ta textauto tx textmode tw textwidth tsr 
thesaurus tsrfu thesaurusfunc top tildeop to timeout tm timeoutlen title 
titlelen titleold titlestring tb toolbar tbis toolbariconsize ttimeout ttm 
ttimeoutlen tbi ttybuiltin tf ttyfast ttym ttymouse tsl ttyscroll tty ttytype 
udir undodir udf undofile ul undolevels ur undoreload uc updatecount ut 
updatetime vsts varsofttabstop vts vartabstop vbs verbose vfile verbosefile 
vdir viewdir vop viewoptions vi viminfo vif viminfofile ve virtualedit vb 
visualbell warn wiv weirdinvert ww whichwrap wc wildchar wcm wildcharm wig 
wildignore wic wildignorecase wmnu wildmenu
-syn keyword vimOptionVarName contained wim wildmode wop wildoptions wak 
winaltkeys wcr wincolor wi window wfb winfixbuf wfh winfixheight wfw 
winfixwidth wh winheight wmh winminheight wmw winminwidth winptydll wiw 
winwidth wse wlseat wst wlsteal wtm wltimeoutlen wrap wm wrapmargin ws wrapscan 
write wa writeany wb writebackup wd writedelay xtermcodes
+syn keyword vimOptionVarName contained co columns com comments cms 
commentstring cp compatible cpt complete cfu completefunc cia completeitemalign 
cot completeopt cpp completepopup csl completeslash cto completetimeout cocu 
concealcursor cole conceallevel cf confirm ci copyindent cpo cpoptions cm 
cryptmethod cspc cscopepathcomp csprg cscopeprg csqf cscopequickfix csre 
cscoperelative cst cscopetag csto cscopetagorder csverb cscopeverbose crb 
cursorbind cuc cursorcolumn cul cursorline culopt cursorlineopt debug def 
define deco delcombine dict dictionary diff dia diffanchors dex diffexpr dip 
diffopt dg digraph dir directory dy display ead eadirection ed edcompatible emo 
emoji enc encoding eof endoffile eol endofline ea equalalways ep equalprg eb 
errorbells ef errorfile
+syn keyword vimOptionVarName contained efm errorformat ek esckeys ei 
eventignore eiw eventignorewin et expandtab ex exrc fenc fileencoding fencs 
fileencodings ff fileformat ffs fileformats fic fileignorecase ft filetype fcs 
fillchars ffu findfunc fixeol fixendofline fcl foldclose fdc foldcolumn fen 
foldenable fde foldexpr fdi foldignore fdl foldlevel fdls foldlevelstart fmr 
foldmarker fdm foldmethod fml foldminlines fdn foldnestmax fdo foldopen fdt 
foldtext fex formatexpr flp formatlistpat fo formatoptions fp formatprg fs 
fsync gd gdefault gfm grepformat gp grepprg gcr guicursor gfn guifont gfs 
guifontset gfw guifontwide ghr guiheadroom gli guiligatures go guioptions 
guipty gtl guitablabel gtt guitabtooltip hf helpfile hh helpheight hlg helplang 
hid hidden hl highlight
+syn keyword vimOptionVarName contained hi history hk hkmap hkp hkmapp hls 
hlsearch icon iconstring ic ignorecase imaf imactivatefunc imak imactivatekey 
imc imcmdline imd imdisable imi iminsert ims imsearch imsf imstatusfunc imst 
imstyle inc include inex includeexpr is incsearch inde indentexpr indk 
indentkeys inf infercase im insertmode ise isexpand isf isfname isi isident isk 
iskeyword isp isprint js joinspaces jop jumpoptions key kmp keymap km keymodel 
kpc keyprotocol kp keywordprg lmap langmap lm langmenu lnr langnoremap lrm 
langremap ls laststatus lz lazyredraw lhi lhistory lbr linebreak lines lsp 
linespace lisp lop lispoptions lw lispwords list lcs listchars lpl loadplugins 
luadll magic mef makeef menc makeencoding mp makeprg mps matchpairs mat 
matchtime
+syn keyword vimOptionVarName contained mco maxcombine mfd maxfuncdepth mmd 
maxmapdepth mm maxmem mmp maxmempattern mmt maxmemtot msc maxsearchcount mis 
menuitems mopt messagesopt msm mkspellmem ml modeline mle modelineexpr mls 
modelines ma modifiable mod modified more mouse mousef mousefocus mh mousehide 
mousem mousemodel mousemev mousemoveevent mouses mouseshape mouset mousetime 
mzq mzquantum mzschemedll mzschemegcdll nf nrformats nu number nuw numberwidth 
ofu omnifunc odev opendevice opfunc operatorfunc ost osctimeoutlen pp packpath 
para paragraphs paste pt pastetoggle pex patchexpr pm patchmode pa path perldll 
pi preserveindent pvh previewheight pvp previewpopup pvw previewwindow pdev 
printdevice penc printencoding pexpr printexpr pfn printfont pheader printheader
+syn keyword vimOptionVarName contained pmbcs printmbcharset pmbfn printmbfont 
popt printoptions prompt pb pumborder ph pumheight pmw pummaxwidth pw pumwidth 
pythondll pythonhome pythonthreedll pythonthreehome pyx pyxversion qftf 
quickfixtextfunc qe quoteescape ro readonly rdt redrawtime re regexpengine rnu 
relativenumber remap rop renderoptions report rs restorescreen ri revins rl 
rightleft rlc rightleftcmd rubydll ru ruler ruf rulerformat rtp runtimepath scr 
scroll scb scrollbind scf scrollfocus sj scrolljump so scrolloff sbo scrollopt 
sect sections secure sel selection slm selectmode ssop sessionoptions sh shell 
shcf shellcmdflag sp shellpipe shq shellquote srr shellredir ssl shellslash 
stmp shelltemp st shelltype sxe shellxescape sxq shellxquote sr shiftround
+syn keyword vimOptionVarName contained sw shiftwidth shm shortmess sn 
shortname sbr showbreak sc showcmd sloc showcmdloc sft showfulltag sm showmatch 
smd showmode stal showtabline stpl showtabpanel ss sidescroll siso 
sidescrolloff scl signcolumn scs smartcase si smartindent sta smarttab sms 
smoothscroll sts softtabstop spell spc spellcapcheck spf spellfile spl 
spelllang spo spelloptions sps spellsuggest sb splitbelow spk splitkeep spr 
splitright sol startofline stl statusline su suffixes sua suffixesadd swf 
swapfile sws swapsync swb switchbuf smc synmaxcol syn syntax tcl tabclose tal 
tabline tpm tabpagemax tpl tabpanel tplo tabpanelopt ts tabstop tbs tagbsearch 
tc tagcase tfu tagfunc tl taglength tr tagrelative tag tags tgst tagstack 
tcldll term tbidi termbidi
+syn keyword vimOptionVarName contained tenc termencoding tgc termguicolors twk 
termwinkey twsl termwinscroll tws termwinsize twt termwintype terse ta textauto 
tx textmode tw textwidth tsr thesaurus tsrfu thesaurusfunc top tildeop to 
timeout tm timeoutlen title titlelen titleold titlestring tb toolbar tbis 
toolbariconsize ttimeout ttm ttimeoutlen tbi ttybuiltin tf ttyfast ttym 
ttymouse tsl ttyscroll tty ttytype udir undodir udf undofile ul undolevels ur 
undoreload uc updatecount ut updatetime vsts varsofttabstop vts vartabstop vbs 
verbose vfile verbosefile vdir viewdir vop viewoptions vi viminfo vif 
viminfofile ve virtualedit vb visualbell warn wiv weirdinvert ww whichwrap wc 
wildchar wcm wildcharm wig wildignore wic wildignorecase wmnu wildmenu wim 
wildmode wop wildoptions
+syn keyword vimOptionVarName contained wak winaltkeys wcr wincolor wi window 
wfb winfixbuf wfh winfixheight wfw winfixwidth wh winheight wmh winminheight 
wmw winminwidth winptydll wiw winwidth wse wlseat wst wlsteal wtm wltimeoutlen 
wrap wm wrapmargin ws wrapscan write wa writeany wb writebackup wd writedelay 
xtermcodes
 " GEN_SYN_VIM: vimOption term output code variable, START_STR='syn keyword 
vimOptionVarName contained', END_STR=''
 syn keyword vimOptionVarName contained t_AB t_AF t_AU t_AL t_al t_bc t_BE t_BD 
t_cd t_ce t_Ce t_CF t_cl t_cm t_Co t_CS t_Cs t_cs t_CV t_da t_db t_DL t_dl t_ds 
t_Ds t_EC t_EI t_fs t_fd t_fe t_GP t_IE t_IS t_ke t_ks t_le t_mb t_md t_me t_mr 
t_ms t_nd t_op t_RF t_RB t_RC t_RI t_Ri t_RK t_RS t_RT t_RV t_Sb t_SC t_se t_Sf 
t_SH t_SI t_Si t_so t_SR t_sr t_ST t_Te t_te t_TE t_ti t_TI t_Ts t_ts t_u7 t_ue 
t_us t_Us t_ut t_vb t_ve t_vi t_VS t_vs t_WP t_WS t_XM t_xn t_xs t_ZH t_ZR t_8f 
t_8b t_8u t_xo
 syn keyword vimOptionVarName contained t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 
t_F9 t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 
t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_KE t_KF t_KG t_kh t_KH t_kI 
t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ku
diff --git a/src/insexpand.c b/src/insexpand.c
index 22caba3df..ea4ce495b 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -137,11 +137,8 @@ static compl_T    *compl_shown_match = NULL;
 static compl_T    *compl_old_match = NULL;
 
 // list used to store the compl_T which have the max score
-// used for completefuzzycollect
 static compl_T   **compl_best_matches = NULL;
 static int       compl_num_bests = 0;
-// inserted a longest when completefuzzycollect enabled
-static int       compl_cfc_longest_ins = FALSE;
 
 // After using a cursor key <Enter> selects a match in the popup menu,
 // otherwise it inserts a line break.
@@ -827,19 +824,12 @@ ins_compl_add_infercase(
 }
 
 /*
- * Check if ctrl_x_mode has been configured in 'completefuzzycollect'
+ * Check if fuzzy matching is enabled
  */
     static int
-cfc_has_mode(void)
+cot_fuzzy(void)
 {
-    if (ctrl_x_mode_normal() || ctrl_x_mode_dictionary())
-       return (cfc_flags & CFC_KEYWORD) != 0;
-    else if (ctrl_x_mode_files())
-       return (cfc_flags & CFC_FILES) != 0;
-    else if (ctrl_x_mode_whole_line())
-       return (cfc_flags & CFC_WHOLELINE) != 0;
-    else
-       return FALSE;
+    return (get_cot_flags() & COT_FUZZY) != 0;
 }
 
 /*
@@ -848,9 +838,8 @@ cfc_has_mode(void)
     static int
 is_nearest_active(void)
 {
-    int flags = get_cot_flags();
-    return (compl_autocomplete || (flags & COT_NEAREST))
-       && !(flags & COT_FUZZY);
+    return (compl_autocomplete || (get_cot_flags() & COT_NEAREST))
+       && !cot_fuzzy();
 }
 
 /*
@@ -996,14 +985,13 @@ ins_compl_add(
     // current match in the list of matches .
     if (compl_first_match == NULL)
        match->cp_next = match->cp_prev = NULL;
-    else if (cfc_has_mode() && score != FUZZY_SCORE_NONE && compl_get_longest)
+    else if (cot_fuzzy() && score != FUZZY_SCORE_NONE && compl_get_longest)
     {
        current = compl_first_match->cp_next;
        prev = compl_first_match;
        inserted = FALSE;
-       // The direction is ignored when using longest and
-       // completefuzzycollect, because matches are inserted
-       // and sorted by score.
+       // The direction is ignored when using longest and fuzzy match, because
+       // matches are inserted and sorted by score.
        while (current != NULL && current != compl_first_match)
        {
            if (current->cp_score < score)
@@ -1046,7 +1034,7 @@ ins_compl_add(
     compl_curr_match = match;
 
     // Find the longest common string if still doing that.
-    if (compl_get_longest && (flags & CP_ORIGINAL_TEXT) == 0 && !cfc_has_mode()
+    if (compl_get_longest && (flags & CP_ORIGINAL_TEXT) == 0 && !cot_fuzzy()
            && !ins_compl_preinsert_longest())
        ins_compl_longest_match(match);
 
@@ -1110,7 +1098,7 @@ ins_compl_col_range_attr(linenr_T lnum, int col)
                        || ins_compl_preinsert_longest();
     int            attr;
 
-    if ((get_cot_flags() & COT_FUZZY)
+    if (cot_fuzzy()
            || (!compl_hi_on_autocompl_longest && ins_compl_preinsert_longest())
            || (attr = syn_name2attr(has_preinsert
                    ? (char_u *)"PreInsert" : (char_u *)"ComplMatchIns")) == 0)
@@ -1647,10 +1635,8 @@ ins_compl_build_pum(void)
     int                shown_match_ok = FALSE;
     int                i = 0;
     int                cur = -1;
-    unsigned int cur_cot_flags = get_cot_flags();
-    int                compl_no_select = (cur_cot_flags & COT_NOSELECT) != 0
+    int                compl_no_select = (get_cot_flags() & COT_NOSELECT) != 0
                    || (compl_autocomplete && !ins_compl_has_preinsert());
-    int                fuzzy_filter = (cur_cot_flags & COT_FUZZY) != 0;
     compl_T    *match_head = NULL;
     compl_T    *match_tail = NULL;
     compl_T    *match_next = NULL;
@@ -1691,14 +1677,14 @@ ins_compl_build_pum(void)
 
        // Apply 'smartcase' behavior during normal mode
        if (ctrl_x_mode_normal() && !p_inf && leader->string
-               && !ignorecase(leader->string) && !fuzzy_filter)
+               && !ignorecase(leader->string) && !cot_fuzzy())
            compl->cp_flags &= ~CP_ICASE;
 
        if (!match_at_original_text(compl)
                && (leader->string == NULL
                    || ins_compl_equal(compl, leader->string,
                        (int)leader->length)
-                   || (fuzzy_filter && compl->cp_score != FUZZY_SCORE_NONE)))
+                   || (cot_fuzzy() && compl->cp_score != FUZZY_SCORE_NONE)))
        {
            // Limit number of items from each source if max_items is set.
            int match_limit_exceeded = FALSE;
@@ -1721,7 +1707,7 @@ ins_compl_build_pum(void)
                    match_tail->cp_match_next = compl;
                match_tail = compl;
 
-               if (!shown_match_ok && !fuzzy_filter)
+               if (!shown_match_ok && !cot_fuzzy())
                {
                    if (compl == compl_shown_match || did_find_shown_match)
                    {
@@ -1737,7 +1723,7 @@ ins_compl_build_pum(void)
                        shown_compl = compl;
                    cur = i;
                }
-               else if (fuzzy_filter)
+               else if (cot_fuzzy())
                {
                    if (i == 0)
                        shown_compl = compl;
@@ -1752,7 +1738,7 @@ ins_compl_build_pum(void)
            }
        }
 
-       if (compl == compl_shown_match && !fuzzy_filter)
+       if (compl == compl_shown_match && !cot_fuzzy())
        {
            did_find_shown_match = TRUE;
 
@@ -1777,7 +1763,7 @@ ins_compl_build_pum(void)
     if (compl_match_arraysize == 0)
        return -1;
 
-    if (fuzzy_filter && !compl_no_select && !shown_match_ok)
+    if (cot_fuzzy() && !compl_no_select && !shown_match_ok)
     {
        compl_shown_match = shown_compl;
        shown_match_ok = TRUE;
@@ -1993,8 +1979,8 @@ ins_compl_dictionaries(
 # endif
            if (count > 0)      // avoid warning for using "files" uninit
        {
-           ins_compl_files(count, files, thesaurus, flags,
-                           (cfc_has_mode() ? NULL : &regmatch), buf, &dir);
+           ins_compl_files(count, files, thesaurus, flags, &regmatch, buf,
+                   &dir);
            if (flags != DICT_EXACT)
                FreeWild(count, files);
        }
@@ -2084,12 +2070,11 @@ ins_compl_files(
     int                add_r;
     char_u     *leader = NULL;
     int                leader_len = 0;
-    int                in_fuzzy_collect = cfc_has_mode();
     int                score = 0;
     int                len = 0;
     char_u     *line_end = NULL;
 
-    if (in_fuzzy_collect)
+    if (cot_fuzzy())
     {
        leader = ins_compl_leader();
        leader_len = (int)ins_compl_leader_len();
@@ -2116,7 +2101,28 @@ ins_compl_files(
               && !vim_fgets(buf, LSIZE, fp))
        {
            ptr = buf;
-           if (regmatch != NULL)
+           if (cot_fuzzy() && leader_len > 0)
+           {
+               line_end = find_line_end(ptr);
+               while (ptr < line_end)
+               {
+                   if (fuzzy_match_str_in_line(&ptr, leader, &len, NULL, 
&score))
+                   {
+                       char_u *end_ptr = ctrl_x_mode_line_or_eval()
+                                       ? find_line_end(ptr) : 
find_word_end(ptr);
+                       add_r = ins_compl_add_infercase(ptr, (int)(end_ptr - 
ptr),
+                                           p_ic, files[i], *dir, FALSE, score);
+                       if (add_r == FAIL)
+                           break;
+                       ptr = end_ptr;  // start from next word
+                       if (compl_get_longest && ctrl_x_mode_normal()
+                               && compl_first_match->cp_next
+                               && score == 
compl_first_match->cp_next->cp_score)
+                           compl_num_bests++;
+                   }
+               }
+           }
+           else if (regmatch != NULL)
            {
                while (vim_regexec(regmatch, buf, (colnr_T)(ptr - buf)))
                {
@@ -2144,27 +2150,6 @@ ins_compl_files(
                        break;
                }
            }
-           else if (in_fuzzy_collect && leader_len > 0)
-           {
-               line_end = find_line_end(ptr);
-               while (ptr < line_end)
-               {
-                   if (fuzzy_match_str_in_line(&ptr, leader, &len, NULL, 
&score))
-                   {
-                       char_u *end_ptr = ctrl_x_mode_line_or_eval()
-                                       ? find_line_end(ptr) : 
find_word_end(ptr);
-                       add_r = ins_compl_add_infercase(ptr, (int)(end_ptr - 
ptr),
-                                           p_ic, files[i], *dir, FALSE, score);
-                       if (add_r == FAIL)
-                           break;
-                       ptr = end_ptr;  // start from next word
-                       if (compl_get_longest && ctrl_x_mode_normal()
-                               && compl_first_match->cp_next
-                               && score == 
compl_first_match->cp_next->cp_score)
-                           compl_num_bests++;
-                   }
-               }
-           }
            line_breakcheck();
            ins_compl_check_keys(50, FALSE);
        }
@@ -2284,7 +2269,6 @@ ins_compl_clear(void)
 {
     compl_cont_status = 0;
     compl_started = FALSE;
-    compl_cfc_longest_ins = FALSE;
     compl_matches = 0;
     compl_selected_item = -1;
     compl_ins_end_col = 0;
@@ -2539,7 +2523,7 @@ ins_compl_new_leader(void)
        ins_compl_set_original_text(compl_leader.string, compl_leader.length);
        if (is_cpt_func_refresh_always())
            cpt_compl_refresh();
-       if (get_cot_flags() & COT_FUZZY)
+       if (cot_fuzzy())
            ins_compl_fuzzy_sort();
     }
     else
@@ -4723,7 +4707,6 @@ fuzzy_longest_match(void)
     if (prefix != NULL)
     {
        ins_compl_longest_insert(prefix);
-       compl_cfc_longest_ins = TRUE;
        vim_free(prefix);
     }
 
@@ -4747,7 +4730,7 @@ get_next_filename_completion(void)
     int                score;
     char_u     *leader = ins_compl_leader();
     size_t     leader_len = ins_compl_leader_len();;
-    int                in_fuzzy_collect = (cfc_has_mode() && leader_len > 0);
+    int                in_fuzzy_collect = (cot_fuzzy() && leader_len > 0);
     int                *fuzzy_indices_data;
     char_u     *last_sep = NULL;
     int                need_collect_bests = in_fuzzy_collect && 
compl_get_longest;
@@ -5059,8 +5042,7 @@ get_next_default_completion(ins_compl_next_state_T *st, 
pos_T *start_pos)
     char_u     *ptr = NULL;
     int                len = 0;
     int                in_fuzzy_collect = !compl_status_adding()
-               && ((cfc_has_mode() && compl_length > 0)
-                   || ((get_cot_flags() & COT_FUZZY) && compl_autocomplete));
+                       && cot_fuzzy() && compl_length > 0;
     char_u     *leader = ins_compl_leader();
     int                score = FUZZY_SCORE_NONE;
     int                in_curbuf = st->ins_buf == curbuf;
@@ -5601,7 +5583,7 @@ ins_compl_get_exp(pos_T *ini)
                                        && (!compl_started || st.found_all))
        {
            int status = process_next_cpt_value(&st, &type, &start_pos,
-                   cfc_has_mode(), &may_advance_cpt_idx);
+                   cot_fuzzy(), &may_advance_cpt_idx);
 
            if (status == INS_COMPL_CPT_END)
                break;
@@ -5695,7 +5677,7 @@ ins_compl_get_exp(pos_T *ini)
                && !ctrl_x_mode_line_or_eval()))
        match_count = ins_compl_make_cyclic();
 
-    if (cfc_has_mode() && compl_get_longest && compl_num_bests > 0)
+    if (cot_fuzzy() && compl_get_longest && compl_num_bests > 0)
        fuzzy_longest_match();
 
     if (compl_old_match != NULL)
@@ -5715,7 +5697,7 @@ ins_compl_get_exp(pos_T *ini)
        if (is_nearest_active() && !ins_compl_has_preinsert())
            sort_compl_match_list(cp_compare_nearest);
 
-       if ((get_cot_flags() & COT_FUZZY) && ins_compl_leader_len() > 0)
+       if (cot_fuzzy() && ins_compl_leader_len() > 0)
            ins_compl_fuzzy_sort();
     }
 
@@ -6141,7 +6123,6 @@ find_next_completion_match(
     unsigned int cur_cot_flags = get_cot_flags();
     int                compl_no_select = (cur_cot_flags & COT_NOSELECT) != 0
                    || (compl_autocomplete && !ins_compl_has_preinsert());
-    int                compl_fuzzy_match = (cur_cot_flags & COT_FUZZY) != 0;
     string_T   *leader;
 
 
@@ -6218,7 +6199,7 @@ find_next_completion_match(
                && leader->string != NULL
                && !ins_compl_equal(compl_shown_match,
                    leader->string, (int)leader->length)
-               && !(compl_fuzzy_match
+               && !(cot_fuzzy()
                    && compl_shown_match->cp_score != FUZZY_SCORE_NONE))
            ++todo;
        else
@@ -6271,7 +6252,6 @@ ins_compl_next(
     unsigned int cur_cot_flags = get_cot_flags();
     int            compl_no_insert = (cur_cot_flags & COT_NOINSERT) != 0
                    || (compl_autocomplete && !ins_compl_has_preinsert());
-    int            compl_fuzzy_match = (cur_cot_flags & COT_FUZZY) != 0;
     int            compl_preinsert = ins_compl_has_preinsert();
     int            has_autocomplete_delay = (compl_autocomplete && p_acl > 0);
 
@@ -6282,7 +6262,7 @@ ins_compl_next(
 
     if (compl_leader.string != NULL
            && !match_at_original_text(compl_shown_match)
-           && !compl_fuzzy_match)
+           && !cot_fuzzy())
        // Update "compl_shown_match" to the actually shown match
        ins_compl_update_shown_match();
 
diff --git a/src/optionstr.c b/src/optionstr.c
index 8df27ffbd..d5a81dd42 100644
--- a/src/optionstr.c
+++ b/src/optionstr.c
@@ -161,7 +161,6 @@ didset_string_options(void)
     (void)opt_strings_flags(p_cmp, p_cmp_values, &cmp_flags, TRUE);
     (void)opt_strings_flags(p_bkc, p_bkc_values, &bkc_flags, TRUE);
     (void)opt_strings_flags(p_bo, p_bo_values, &bo_flags, TRUE);
-    (void)opt_strings_flags(p_cfc, p_cfc_values, &cfc_flags, TRUE);
     (void)opt_strings_flags(p_cot, p_cot_values, &cot_flags, TRUE);
 #ifdef FEAT_SESSION
     (void)opt_strings_flags(p_ssop, p_ssop_values, &ssop_flags, TRUE);
diff --git a/src/testdir/test_ins_complete.vim 
b/src/testdir/test_ins_complete.vim
index fbc15e5c1..c2268682f 100644
--- a/src/testdir/test_ins_complete.vim
+++ b/src/testdir/test_ins_complete.vim
@@ -381,8 +381,8 @@ func Test_CompleteDone_vevent_keys()
   call assert_equal('foo_test', g:complete_word)
   call assert_equal('files', g:complete_type)
 
-  call writefile(['hello help'], 'test_case.txt', 'D')
-  set dictionary=test_case.txt
+  call writefile(['hello help'], 'Xtest_case.txt', 'D')
+  set dictionary=Xtest_case.txt
   call feedkeys("ggdGSh\<C-X>\<C-K>\<C-Y>\<Esc>", 'tx')
   call assert_equal('hello', g:complete_word)
   call assert_equal('dictionary', g:complete_type)
@@ -3550,6 +3550,7 @@ func Test_complete_opt_fuzzy()
   call feedkeys("i\<C-R>=CompAnother()\<CR>\<C-P>\<C-P>", 'tx')
   call assert_equal("for", g:abbr)
 
+  %d
   set cot=menu,fuzzy
   call feedkeys("Sblue\<CR>bar\<CR>b\<C-X>\<C-P>\<C-Y>\<ESC>", 'tx')
   call assert_equal('blue', getline('.'))
@@ -3582,7 +3583,7 @@ func Test_complete_opt_fuzzy()
   " Issue 18488: sort after collection when "fuzzy" (unless "nosort")
   %d
   set completeopt&
-  set completeopt+=fuzzy,noselect completefuzzycollect=keyword
+  set completeopt+=fuzzy,noselect
   func! PrintMenuWords()
     let info = complete_info(["items"])
     call map(info.items, {_, v -> v.word})
@@ -3595,7 +3596,7 @@ func Test_complete_opt_fuzzy()
   " clean up
   set omnifunc=
   bw!
-  set complete& completeopt& completefuzzycollect&
+  set complete& completeopt&
   autocmd! AAAAA_Group
   augroup! AAAAA_Group
   delfunc OnPumChange
@@ -3609,7 +3610,7 @@ endfunc
 
 func Test_complete_fuzzy_collect()
   new
-  set completefuzzycollect=keyword,files,whole_line
+  set completeopt+=fuzzy
   call setline(1, ['hello help hero h'])
   " Use "!" flag of feedkeys() so that ex_normal_busy is not set and
   " ins_compl_check_keys() is not skipped.
@@ -3687,7 +3688,7 @@ func Test_complete_fuzzy_collect()
   call assert_equal('no one can save me but you', getline('.'))
 
   " issue #15526
-  set completeopt=menuone,menu,noselect
+  set completeopt=menuone,menu,noselect,fuzzy
   call setline(1, ['Text', 'ToText', ''])
   call cursor(3, 1)
   call feedkeys("STe\<C-X>\<C-N>x\<CR>\<Esc>0", 'tx!')
@@ -3700,8 +3701,8 @@ func Test_complete_fuzzy_collect()
   call assert_equal('completefuzzycollect', getline(line('.') - 1))
 
   " keywords in 'dictonary'
-  call writefile(['hello', 'think'], 'test_dict.txt', 'D')
-  set dict=test_dict.txt
+  call writefile(['hello', 'think'], 'Xtest_dict.txt', 'D')
+  set dict=Xtest_dict.txt
   call feedkeys("Sh\<C-X>\<C-K>\<C-N>\<CR>\<Esc>0", 'tx!')
   call assert_equal('hello', getline(line('.') - 1))
   call feedkeys("Sh\<C-X>\<C-K>\<C-N>\<C-N>\<CR>\<Esc>0", 'tx!')
@@ -3716,16 +3717,26 @@ func Test_complete_fuzzy_collect()
   call feedkeys("Gofuzzy\<C-X>\<C-N>\<C-N>\<C-N>\<C-Y>\<Esc>0", 'tx!')
   call assert_equal('fuzzycollect', getline('.'))
 
+  " when 'fuzzy' is not set, and 'infercase' and 'ignorecase' are set, then
+  " uppercase completes from lowercase words in dictonary
+  set completeopt&
+  set infercase ignorecase
+  call writefile(['hello'], 'Xtest_case.txt', 'D')
+  set dictionary=Xtest_case.txt
+  call feedkeys("ggdGSH\<C-X>\<C-K>\<C-Y>\<Esc>", 'tx')
+  call assert_equal('Hello', getline('.'))
+  call feedkeys("ggdGSHE\<C-X>\<C-K>\<C-Y>\<Esc>", 'tx')
+  call assert_equal('HELLO', getline('.'))
+
   bw!
   bw!
   set dict&
-  set completeopt& cfc& cpt&
+  set completeopt& cpt& ignorecase& infercase&
 endfunc
 
 " Issue #18752
 func Test_complete_fuzzy_collect_multiwin()
   new
-  set completefuzzycollect=keyword,files,whole_line
   set completeopt=fuzzy
 
   vnew
@@ -3735,12 +3746,11 @@ func Test_complete_fuzzy_collect_multiwin()
   call assert_equal('Omnipotent', getline('.'))
 
   bw!
-  set completeopt& cfc&
+  set completeopt&
 endfunc
 
 func Test_cfc_with_longest()
   new
-  set completefuzzycollect=keyword,files,whole_line
   set completeopt=menu,menuone,longest,fuzzy
 
   " keyword
@@ -3824,7 +3834,6 @@ func Test_cfc_with_longest()
 
   bw!
   set completeopt&
-  set completefuzzycollect&
 endfunc
 
 func Test_completefuzzycollect_with_completeslash()
@@ -3834,7 +3843,7 @@ func Test_completefuzzycollect_with_completeslash()
   let orig_shellslash = &shellslash
   set cpt&
   new
-  set completefuzzycollect=files
+  set completeopt+=fuzzy
   set noshellslash
 
   " Test with completeslash unset
@@ -3856,7 +3865,6 @@ func Test_completefuzzycollect_with_completeslash()
   " Reset and clean up
   let &shellslash = orig_shellslash
   set completeslash=
-  set completefuzzycollect&
   %bw!
 endfunc
 
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index b6e5accf7..bf400d18f 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -1531,8 +1531,7 @@ endfunc
 func Test_pum_completefuzzycollect()
   CheckScreendump
   let lines =<< trim END
-    set completefuzzycollect=keyword,files
-    set completeopt=menu,menuone
+    set completeopt=menu,menuone,fuzzy
   END
   call writefile(lines, 'Xscript', 'D')
   let  buf = RunVimInTerminal('-S Xscript', {})
diff --git a/src/version.c b/src/version.c
index 99a865d2a..e2619a339 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1930,
 /**/
     1929,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1vOdwq-004uOn-KQ%40256bit.org.

Raspunde prin e-mail lui