aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-01-17 19:52:02 +0800
committerGitHub <noreply@github.com>2023-01-17 19:52:02 +0800
commit132f001ce84d8d750ac5c492a23b7d499fb47c6a (patch)
treebf5908c4909e5cf87efb47b37dcab1dbb11951fa /src/nvim/testdir
parentddd69a6c81c1a2595e81377503dd2b47f2c41b83 (diff)
downloadrneovim-132f001ce84d8d750ac5c492a23b7d499fb47c6a.tar.gz
rneovim-132f001ce84d8d750ac5c492a23b7d499fb47c6a.tar.bz2
rneovim-132f001ce84d8d750ac5c492a23b7d499fb47c6a.zip
vim-patch:8.2.4483: command completion makes two rounds to collect matches (#21857)
Problem: Command completion makes two rounds to collect matches. Solution: Use a growarray to collect matches. (Yegappan Lakshmanan, closes vim/vim#9860) https://github.com/vim/vim/commit/5de4c4372d4366bc85cb66efb3e373439b9471c5 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_cmdline.vim18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim
index 210c2774f2..ea7bfae639 100644
--- a/src/nvim/testdir/test_cmdline.vim
+++ b/src/nvim/testdir/test_cmdline.vim
@@ -2876,6 +2876,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&