aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-27 07:25:47 +0800
committerGitHub <noreply@github.com>2022-07-27 07:25:47 +0800
commit890d4023cd9de715a0102b1dd26ce249f11a47b4 (patch)
tree33055d64d0e674ab3cf591635fceafa9613df9c6 /src/nvim/testdir
parent2fdb0de1975b015d8745141eaa18e62af793e0ef (diff)
downloadrneovim-890d4023cd9de715a0102b1dd26ce249f11a47b4.tar.gz
rneovim-890d4023cd9de715a0102b1dd26ce249f11a47b4.tar.bz2
rneovim-890d4023cd9de715a0102b1dd26ce249f11a47b4.zip
vim-patch:9.0.0081: command line completion of user command may have duplicates (#19529)
Problem: Command line completion of user command may have duplicates. (Dani Dickstein) Solution: Skip global user command if an identical buffer-local one is defined. (closes vim/vim#10797) https://github.com/vim/vim/commit/c2842adfb2ca0637f13e2793fefa18e7818684f9
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_cmdline.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim
index a0907d79ac..094c6fd8d4 100644
--- a/src/nvim/testdir/test_cmdline.vim
+++ b/src/nvim/testdir/test_cmdline.vim
@@ -704,6 +704,16 @@ func Test_cmdline_complete_user_cmd()
delcommand Foo
endfunc
+func Test_complete_user_cmd()
+ command FooBar echo 'global'
+ command -buffer FooBar echo 'local'
+ call feedkeys(":Foo\<C-A>\<Home>\"\<CR>", 'tx')
+ call assert_equal('"FooBar', @:)
+
+ delcommand -buffer FooBar
+ delcommand FooBar
+endfunc
+
func s:ScriptLocalFunction()
echo 'yes'
endfunc