diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2022-02-28 13:28:38 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-02-28 13:28:38 +0000 |
commit | 5de4c4372d4366bc85cb66efb3e373439b9471c5 (patch) | |
tree | 03a6aea2f9b80a06bc66775e4ea88168dd2d148d /src/testdir | |
parent | afd4ae35d66b2e7732eceb5ad9f6b4ece6b7c64c (diff) | |
download | vim-git-5de4c4372d4366bc85cb66efb3e373439b9471c5.tar.gz |
patch 8.2.4483: command completion makes two rounds to collect matchesv8.2.4483
Problem: Command completion makes two rounds to collect matches.
Solution: Use a growarray to collect matches. (Yegappan Lakshmanan,
closes #9860)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_cmdline.vim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index 1e68f472e..c354fa102 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -2661,6 +2661,24 @@ func Test_fuzzy_completion_userdefined_func() set wildoptions& endfunc +" <SNR> functions should be sorted to the end +func Test_fuzzy_completion_userdefined_snr_func() + func s:Sendmail() + endfunc + func SendSomemail() + endfunc + func S1e2n3dmail() + endfunc + set wildoptions=fuzzy + call feedkeys(":call sendmail\<C-A>\<C-B>\"\<CR>", 'tx') + call assert_equal('"call SendSomemail() S1e2n3dmail() ' + \ .. expand("<SID>") .. 'Sendmail()', @:) + set wildoptions& + delfunc s:Sendmail + delfunc SendSomemail + delfunc S1e2n3dmail +endfunc + " user defined command name completion func Test_fuzzy_completion_userdefined_cmd() set wildoptions& |