mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 16:08:36 +00:00
vim-patch:8.0.1425: execute() does not work in completion of user command (#9317)
Problem: execute() does not work in completion of user command. (thinca)
Solution: Switch off redir_off and restore it. (Ozaki Kiichi, closes vim/vim#2492)
2095148277
This commit is contained in:

committed by
Justin M. Keyes

parent
77b5e9ae25
commit
7697628345
@@ -206,3 +206,15 @@ func Test_CmdCompletion()
|
||||
com! -complete=customlist,CustomComp DoCmd :
|
||||
call assert_fails("call feedkeys(':DoCmd \<C-D>', 'tx')", 'E117:')
|
||||
endfunc
|
||||
|
||||
func CallExecute(A, L, P)
|
||||
" Drop first '\n'
|
||||
return execute('echo "hi"')[1:]
|
||||
endfunc
|
||||
|
||||
func Test_use_execute_in_completion()
|
||||
command! -nargs=* -complete=custom,CallExecute DoExec :
|
||||
call feedkeys(":DoExec \<C-A>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"DoExec hi', @:)
|
||||
delcommand DoExec
|
||||
endfunc
|
||||
|
Reference in New Issue
Block a user