mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
vim-patch:9.1.1226: "shellcmdline" completion doesn't work with input() (#32998)
Problem: "shellcmdline" completion doesn't work with input().
Solution: Use set_context_for_wildcard_arg(). Fix indent in nextwild()
(zeertzjq).
There are some other inconsistencies for input() completion (ref vim/vim#948),
but since "shellcmdline" currently doesn't work at all, it makse sense
to at least make it work.
fixes: vim/vim#16932
closes: vim/vim#16934
7a5115ce50
This commit is contained in:
@@ -2072,10 +2072,20 @@ func Test_input_func()
|
||||
call assert_fails("call input('F:', '', 'invalid')", 'E180:')
|
||||
call assert_fails("call input('F:', '', [])", 'E730:')
|
||||
|
||||
" Test for using 'command' as the completion function
|
||||
" Test for using "command" as the completion function
|
||||
call feedkeys(":let c = input('Command? ', '', 'command')\<CR>"
|
||||
\ .. "echo bufnam\<C-A>\<CR>", 'xt')
|
||||
call assert_equal('echo bufname(', c)
|
||||
|
||||
" Test for using "shellcmdline" as the completion function
|
||||
call feedkeys(":let c = input('Shell? ', '', 'shellcmdline')\<CR>"
|
||||
\ .. "vim test_functions.\<C-A>\<CR>", 'xt')
|
||||
call assert_equal('vim test_functions.vim', c)
|
||||
if executable('whoami')
|
||||
call feedkeys(":let c = input('Shell? ', '', 'shellcmdline')\<CR>"
|
||||
\ .. "whoam\<C-A>\<CR>", 'xt')
|
||||
call assert_match('\<whoami\>', c)
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Test for the inputdialog() function
|
||||
|
||||
Reference in New Issue
Block a user