From 58f2dcfc887134f5ebc33c13d7ef5ce540f8a247 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 17 Jan 2023 16:46:43 +0800 Subject: vim-patch:8.2.4917: fuzzy expansion of option names is not right (#21853) Problem: Fuzzy expansion of option names is not right. Solution: Pass the fuzzy flag down the call chain. (Christian Brabandt, closes vim/vim#10380, closes vim/vim#10318) https://github.com/vim/vim/commit/cb747899bd99361a299a163f3aa55d5fe7d6f798 Co-authored-by: Christian Brabandt --- src/nvim/testdir/test_options.vim | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim index 11c2977a4e..f51de94bac 100644 --- a/src/nvim/testdir/test_options.vim +++ b/src/nvim/testdir/test_options.vim @@ -1238,6 +1238,30 @@ func Test_opt_cdhome() set cdhome& endfunc +func Test_set_completion_2() + CheckOption termguicolors + + " Test default option completion + set wildoptions= + call feedkeys(":set termg\\\"\", 'tx') + call assert_equal('"set termguicolors', @:) + + call feedkeys(":set notermg\\\"\", 'tx') + call assert_equal('"set notermguicolors', @:) + + " Test fuzzy option completion + set wildoptions=fuzzy + call feedkeys(":set termg\\\"\", 'tx') + " Nvim doesn't have 'termencoding' + " call assert_equal('"set termguicolors termencoding', @:) + call assert_equal('"set termguicolors', @:) + + call feedkeys(":set notermg\\\"\", 'tx') + call assert_equal('"set notermguicolors', @:) + + set wildoptions= +endfunc + func Test_switchbuf_reset() set switchbuf=useopen sblast -- cgit