diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2023-01-17 12:38:16 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2023-01-17 14:01:26 +0800 |
| commit | 15e42dd4498829e5315b9b0da7384bedf466d707 (patch) | |
| tree | 06770bda995170000c71e1fbd0b73adb4b52e515 /src/nvim/testdir/test_cmdline.vim | |
| parent | 5ce6685119419c08475a65b6e48b4487be5c6036 (diff) | |
| download | rneovim-15e42dd4498829e5315b9b0da7384bedf466d707.tar.gz rneovim-15e42dd4498829e5315b9b0da7384bedf466d707.tar.bz2 rneovim-15e42dd4498829e5315b9b0da7384bedf466d707.zip | |
vim-patch:8.2.4608: getcompletion() does not work when 'wildoptions' has "fuzzy"
Problem: getcompletion() does not work properly when 'wildoptions
contains "fuzzy".
Solution: Do not use addstar(). (Yegappan Lakshmanan, closes vim/vim#9992,
closes vim/vim#9986)
https://github.com/vim/vim/commit/e7dd0fa2c61fe71f12c72b0dcb7bb6415eb048fb
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'src/nvim/testdir/test_cmdline.vim')
| -rw-r--r-- | src/nvim/testdir/test_cmdline.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index 3895fe27b6..f5c84e0729 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -650,6 +650,22 @@ func Test_getcompletion() call assert_fails('call getcompletion("abc", [])', 'E475:') endfunc +" Test for getcompletion() with "fuzzy" in 'wildoptions' +func Test_getcompletion_wildoptions() + let save_wildoptions = &wildoptions + set wildoptions& + let l = getcompletion('space', 'option') + call assert_equal([], l) + let l = getcompletion('ier', 'command') + call assert_equal([], l) + set wildoptions=fuzzy + let l = getcompletion('space', 'option') + call assert_true(index(l, 'backspace') >= 0) + let l = getcompletion('ier', 'command') + call assert_true(index(l, 'compiler') >= 0) + let &wildoptions = save_wildoptions +endfunc + func Test_fullcommand() let tests = { \ '': '', |