diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-07-22 21:55:18 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-07-22 21:55:18 +0200 |
commit | f03e328348f87e1fe8ce4aad2a6a4237b9f78ce3 (patch) | |
tree | 4b02e96a3b759a0b2560fea8ae81141c87a92176 /src/testdir/test_ins_complete.vim | |
parent | 26b654a5df9414e43734eb4c956b67c331d70a50 (diff) |
patch 8.1.1732: completion in cmdwin does not work for buffer-local commandsv8.1.1732
Problem: Completion in cmdwin does not work for buffer-local commands.
Solution: Use the right buffer. (closes #4711)
Diffstat (limited to 'src/testdir/test_ins_complete.vim')
-rw-r--r-- | src/testdir/test_ins_complete.vim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim index d88b00377c..c028df3e3e 100644 --- a/src/testdir/test_ins_complete.vim +++ b/src/testdir/test_ins_complete.vim @@ -313,3 +313,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 |