diff src/testdir/test_options.vim @ 28786:fd5942a62312 v8.2.4917

patch 8.2.4917: fuzzy expansion of option names is not right Commit: https://github.com/vim/vim/commit/cb747899bd99361a299a163f3aa55d5fe7d6f798 Author: Christian Brabandt <cb@256bit.org> Date: Sun May 8 21:10:56 2022 +0100 patch 8.2.4917: fuzzy expansion of option names is not right Problem: Fuzzy expansion of option names is not right. Solution: Pass the fuzzy flag down the call chain. (Christian Brabandt, closes #10380, closes #10318)
author Bram Moolenaar <Bram@vim.org>
date Sun, 08 May 2022 22:15:02 +0200
parents 8f4f16efeeb3
children fea88e555652
line wrap: on
line diff
--- a/src/testdir/test_options.vim
+++ b/src/testdir/test_options.vim
@@ -1257,4 +1257,26 @@ func Test_opt_cdhome()
   set cdhome&
 endfunc
 
+func Test_set_completion_2()
+  CheckOption termguicolors
+
+  " Test default option completion
+  set wildoptions=
+  call feedkeys(":set termg\<C-A>\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"set termguicolors', @:)
+
+  call feedkeys(":set notermg\<C-A>\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"set notermguicolors', @:)
+
+  " Test fuzzy option completion
+  set wildoptions=fuzzy
+  call feedkeys(":set termg\<C-A>\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"set termguicolors termencoding', @:)
+
+  call feedkeys(":set notermg\<C-A>\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"set notermguicolors', @:)
+
+  set wildoptions=
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab