mirror of
https://github.com/vim/vim.git
synced 2025-10-22 08:34:29 -04:00
patch 9.1.1847: No cmdline completion for :echoconsole and :echowindow
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: #18552 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
37c8ce7fac
commit
7aaca97fc5
@@ -2482,6 +2482,8 @@ set_context_by_cmdname(
|
|||||||
case CMD_execute:
|
case CMD_execute:
|
||||||
case CMD_echomsg:
|
case CMD_echomsg:
|
||||||
case CMD_echoerr:
|
case CMD_echoerr:
|
||||||
|
case CMD_echoconsole:
|
||||||
|
case CMD_echowindow:
|
||||||
case CMD_call:
|
case CMD_call:
|
||||||
case CMD_return:
|
case CMD_return:
|
||||||
case CMD_cexpr:
|
case CMD_cexpr:
|
||||||
|
@@ -3113,6 +3113,8 @@ set_context_for_expression(
|
|||||||
|| cmdidx == CMD_echo
|
|| cmdidx == CMD_echo
|
||||||
|| cmdidx == CMD_echon
|
|| cmdidx == CMD_echon
|
||||||
|| cmdidx == CMD_echomsg
|
|| cmdidx == CMD_echomsg
|
||||||
|
|| cmdidx == CMD_echoerr
|
||||||
|
|| cmdidx == CMD_echoconsole
|
||||||
|| cmdidx == CMD_echowindow)
|
|| cmdidx == CMD_echowindow)
|
||||||
&& xp->xp_context == EXPAND_EXPRESSION)
|
&& xp->xp_context == EXPAND_EXPRESSION)
|
||||||
{
|
{
|
||||||
|
@@ -1333,11 +1333,12 @@ endfunc
|
|||||||
|
|
||||||
func Test_cmdline_complete_expression()
|
func Test_cmdline_complete_expression()
|
||||||
let g:SomeVar = 'blah'
|
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 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 feedkeys(":" .. cmd .. " foo SomeV\<Tab>\<C-B>\"\<CR>", 'tx')
|
||||||
call assert_match('"' .. cmd .. ' foo SomeVar', @:)
|
call assert_match('"' .. cmd .. ' foo SomeVar', @:, cmd)
|
||||||
endfor
|
endfor
|
||||||
unlet g:SomeVar
|
unlet g:SomeVar
|
||||||
endfunc
|
endfunc
|
||||||
|
@@ -729,6 +729,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1847,
|
||||||
/**/
|
/**/
|
||||||
1846,
|
1846,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user