vim-patch:partial:9.1.1847: No cmdline completion for :echoconsole and :echowindow (#36157)

Problem:  No cmdline completion for :echoconsole, :echowindow and second
          expression after :echoerr.
Solution: Set EXPAND_EXPRESSION for :echoconsole and :echowindow, and
          check for multiple expressions after :echoerr (zeertzjq).

closes: vim/vim#18552

7aaca97fc5
This commit is contained in:
zeertzjq
2025-10-13 15:35:16 +08:00
committed by GitHub
parent 7ac6e91d06
commit 7468db5187

View File

@@ -1174,11 +1174,13 @@ endfunc
func Test_cmdline_complete_expression()
let g:SomeVar = 'blah'
for cmd in ['exe', 'echo', 'echon', 'echomsg']
for cmd in ['exe', 'echo', 'echon', 'echomsg', 'echoerr',
"\ 'echoconsole', 'echowindow']
\ ]
call feedkeys(":" .. cmd .. " SomeV\<Tab>\<C-B>\"\<CR>", 'tx')
call assert_match('"' .. cmd .. ' SomeVar', @:)
call assert_match('"' .. cmd .. ' SomeVar', @:, cmd)
call feedkeys(":" .. cmd .. " foo SomeV\<Tab>\<C-B>\"\<CR>", 'tx')
call assert_match('"' .. cmd .. ' foo SomeVar', @:)
call assert_match('"' .. cmd .. ' foo SomeVar', @:, cmd)
endfor
unlet g:SomeVar
endfunc