aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-11-24 21:50:24 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-11-24 23:37:10 -0500
commit7a0a2eb310a5568d6ee743d65f5ae12f60111c6e (patch)
tree34c2e9ab6b14c119fab68805b1e28cbda16c731b /src/nvim/testdir
parentedb194f3306b6b8a9df7a06c15a60425911c7e85 (diff)
downloadrneovim-7a0a2eb310a5568d6ee743d65f5ae12f60111c6e.tar.gz
rneovim-7a0a2eb310a5568d6ee743d65f5ae12f60111c6e.tar.bz2
rneovim-7a0a2eb310a5568d6ee743d65f5ae12f60111c6e.zip
vim-patch:8.1.1732: completion in cmdwin does not work for buffer-local commands
Problem: Completion in cmdwin does not work for buffer-local commands. Solution: Use the right buffer. (closes vim/vim#4711) https://github.com/vim/vim/commit/f03e328348f87e1fe8ce4aad2a6a4237b9f78ce3
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_ins_complete.vim18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_ins_complete.vim b/src/nvim/testdir/test_ins_complete.vim
index 7f52481ba8..52ec281d82 100644
--- a/src/nvim/testdir/test_ins_complete.vim
+++ b/src/nvim/testdir/test_ins_complete.vim
@@ -285,3 +285,21 @@ func Test_compl_feedkeys()
bwipe!
set completeopt&
endfunc
+
+func Test_compl_in_cmdwin()
+ set wildmenu wildchar=<Tab>
+ com! -nargs=1 -complete=command GetInput let input = <q-args>
+ com! -buffer TestCommand echo 'TestCommand'
+
+ let input = ''
+ call feedkeys("q:iGetInput T\<C-x>\<C-v>\<CR>", 'tx!')
+ call assert_equal('TestCommand', input)
+
+ let input = ''
+ call feedkeys("q::GetInput T\<Tab>\<CR>:q\<CR>", 'tx!')
+ call assert_equal('T', input)
+
+ delcom TestCommand
+ delcom GetInput
+ set wildmenu& wildchar&
+endfunc