diff options
author | zeertzjq <zeertzjq@outlook.com> | 2025-03-08 05:58:00 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2025-03-27 07:26:42 +0800 |
commit | 10fde593f177fb7655c5f1c2b9774509e90c6106 (patch) | |
tree | d69255253c914cf39b3bc3d0ed64c5be92745d59 | |
parent | 17db70f3af382211b82574d03b227164f4db510b (diff) | |
download | rneovim-10fde593f177fb7655c5f1c2b9774509e90c6106.tar.gz rneovim-10fde593f177fb7655c5f1c2b9774509e90c6106.tar.bz2 rneovim-10fde593f177fb7655c5f1c2b9774509e90c6106.zip |
vim-patch:9.1.1182: No cmdline completion for 'completefuzzycollect'
Problem: No cmdline completion for the 'completefuzzycollect' option
(after v9.1.1178)
Solution: Add cmdline completion for the 'completefuzzycollect' option,
improve its description in optwin.vim (zeertzjq).
closes: vim/vim#16813
https://github.com/vim/vim/commit/53d59ecc1d93ce3a3f6d0182479d825852018ceb
No code change is needed in Nvim as Nvim uses expand_set_str_generic()
by default.
-rw-r--r-- | runtime/doc/options.txt | 4 | ||||
-rw-r--r-- | runtime/lua/vim/_meta/options.lua | 4 | ||||
-rw-r--r-- | runtime/optwin.vim | 4 | ||||
-rw-r--r-- | src/nvim/options.lua | 4 | ||||
-rw-r--r-- | test/old/testdir/test_options.vim | 1 |
5 files changed, 9 insertions, 8 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index f44ea926b2..a6078849fc 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1548,10 +1548,10 @@ A jump table for the options with a short description can be found at |Q_op|. fuzzy Enable |fuzzy-matching| for completion candidates. This allows for more flexible and intuitive matching, where characters can be skipped and matches can be found even - if the exact sequence is not typed. Note: This option + if the exact sequence is not typed. Note: This option does not affect the collection of candidate list, it only controls how completion candidates are reduced from the - list of alternatives. If you want to use |fuzzy-matching| + list of alternatives. If you want to use |fuzzy-matching| to gather more alternatives for your candidate list, see |'completefuzzycollect'|. diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index cb199231c7..e473558207 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -1078,10 +1078,10 @@ vim.go.cia = vim.go.completeitemalign --- fuzzy Enable `fuzzy-matching` for completion candidates. This --- allows for more flexible and intuitive matching, where --- characters can be skipped and matches can be found even ---- if the exact sequence is not typed. Note: This option +--- if the exact sequence is not typed. Note: This option --- does not affect the collection of candidate list, it only --- controls how completion candidates are reduced from the ---- list of alternatives. If you want to use `fuzzy-matching` +--- list of alternatives. If you want to use `fuzzy-matching` --- to gather more alternatives for your candidate list, --- see `'completefuzzycollect'`. --- diff --git a/runtime/optwin.vim b/runtime/optwin.vim index bfeb3367a7..56fbb954a7 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 Feb 08 +" Last Change: 2025 Mar 07 " Former Maintainer: Bram Moolenaar <Bram@vim.org> " If there already is an option window, jump to that one. @@ -726,7 +726,7 @@ if has("insert_expand") call <SID>AddOption("complete", gettext("specifies how Insert mode completion works for CTRL-N and CTRL-P")) call append("$", "\t" .. s:local_to_buffer) call <SID>OptionL("cfc") - call <SID>AddOption("completefuzzycollect", gettext("using fuzzy collect for defaule completion mode")) + call <SID>AddOption("completefuzzycollect", gettext("use fuzzy collection for specific completion modes")) call <SID>OptionL("cpt") call <SID>AddOption("completeopt", gettext("whether to use a popup menu for Insert mode completion")) call <SID>OptionL("cot") diff --git a/src/nvim/options.lua b/src/nvim/options.lua index 8ee9434a60..71c96b6770 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -1529,10 +1529,10 @@ local options = { fuzzy Enable |fuzzy-matching| for completion candidates. This allows for more flexible and intuitive matching, where characters can be skipped and matches can be found even - if the exact sequence is not typed. Note: This option + if the exact sequence is not typed. Note: This option does not affect the collection of candidate list, it only controls how completion candidates are reduced from the - list of alternatives. If you want to use |fuzzy-matching| + list of alternatives. If you want to use |fuzzy-matching| to gather more alternatives for your candidate list, see |'completefuzzycollect'|. diff --git a/test/old/testdir/test_options.vim b/test/old/testdir/test_options.vim index ce2d9ba05a..9104098baa 100644 --- a/test/old/testdir/test_options.vim +++ b/test/old/testdir/test_options.vim @@ -513,6 +513,7 @@ func Test_set_completion_string_values() endif call assert_equal('.', getcompletion('set complete=', 'cmdline')[1]) call assert_equal('menu', getcompletion('set completeopt=', 'cmdline')[1]) + call assert_equal('keyword', getcompletion('set completefuzzycollect=', 'cmdline')[0]) if exists('+completeslash') call assert_equal('backslash', getcompletion('set completeslash=', 'cmdline')[1]) endif |