From 064fdad98c6eed5f42b72eeeb3efe458fefb377d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 15 Jan 2023 06:40:49 +0800 Subject: vim-patch:8.2.4570: no command line completion for :profile and :profdel Problem: No command line completion for :profile and :profdel. Solution: Implement completion. (Yegappan Lakshmanan, closes vim/vim#9955) https://github.com/vim/vim/commit/1fdf84e033f8c4eead3b4ccebb1969cfbc7d10db Co-authored-by: Yegappan Lakshmanan --- src/nvim/testdir/test_cmdline.vim | 1 - src/nvim/testdir/test_profile.vim | 41 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index 40a23d5af6..a074263359 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -2805,7 +2805,6 @@ func Test_cmdline_complete_breakdel() call assert_equal("\"breakdel here Xtest", @:) call feedkeys(":breakdel here \\\"\", 'tx') call assert_equal("\"breakdel here ", @:) - endfunc " this was going over the end of IObuff diff --git a/src/nvim/testdir/test_profile.vim b/src/nvim/testdir/test_profile.vim index 4225b91bc4..9165f7bace 100644 --- a/src/nvim/testdir/test_profile.vim +++ b/src/nvim/testdir/test_profile.vim @@ -403,6 +403,47 @@ func Test_profile_completion() call feedkeys(":profile start test_prof\\\"\", 'tx') call assert_match('^"profile start.* test_profile\.vim', @:) + + call feedkeys(":profile file test_prof\\\"\", 'tx') + call assert_match('"profile file test_profile\.vim', @:) + call feedkeys(":profile file test_prof\\\"\", 'tx') + call assert_match('"profile file test_profile\.vim', @:) + call feedkeys(":profile file test_prof \\\"\", 'tx') + call assert_match('"profile file test_prof ', @:) + call feedkeys(":profile file X1B2C3\\\"\", 'tx') + call assert_match('"profile file X1B2C3', @:) + + func Xprof_test() + endfunc + call feedkeys(":profile func Xprof\\\"\", 'tx') + call assert_equal('"profile func Xprof_test', @:) + call feedkeys(":profile func Xprof\\\"\", 'tx') + call assert_equal('"profile func Xprof_test', @:) + call feedkeys(":profile func Xprof \\\"\", 'tx') + call assert_equal('"profile func Xprof ', @:) + call feedkeys(":profile func X1B2C3\\\"\", 'tx') + call assert_equal('"profile func X1B2C3', @:) + + call feedkeys(":profdel \\\"\", 'tx') + call assert_equal('"profdel file func', @:) + call feedkeys(":profdel fu\\\"\", 'tx') + call assert_equal('"profdel func', @:) + call feedkeys(":profdel he\\\"\", 'tx') + call assert_equal('"profdel he', @:) + call feedkeys(":profdel here \\\"\", 'tx') + call assert_equal('"profdel here ', @:) + call feedkeys(":profdel file test_prof\\\"\", 'tx') + call assert_equal('"profdel file test_profile.vim', @:) + call feedkeys(":profdel file X1B2C3\\\"\", 'tx') + call assert_equal('"profdel file X1B2C3', @:) + call feedkeys(":profdel func Xprof\\\"\", 'tx') + call assert_equal('"profdel func Xprof_test', @:) + call feedkeys(":profdel func Xprof_test \\\"\", 'tx') + call assert_equal('"profdel func Xprof_test ', @:) + call feedkeys(":profdel func X1B2C3\\\"\", 'tx') + call assert_equal('"profdel func X1B2C3', @:) + + delfunc Xprof_test endfunc func Test_profile_errors() -- cgit