patch 9.1.1847: No cmdline completion for :echoconsole and :echowindow

Commit: 
https://github.com/vim/vim/commit/7aaca97fc5154bb2f2483237b49e25786a061379
Author: zeertzjq <[email protected]>
Date:   Sun Oct 12 14:12:41 2025 +0000

    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 <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/cmdexpand.c b/src/cmdexpand.c
index 0e24d29da..104fe08ae 100644
--- a/src/cmdexpand.c
+++ b/src/cmdexpand.c
@@ -2482,6 +2482,8 @@ set_context_by_cmdname(
        case CMD_execute:
        case CMD_echomsg:
        case CMD_echoerr:
+       case CMD_echoconsole:
+       case CMD_echowindow:
        case CMD_call:
        case CMD_return:
        case CMD_cexpr:
diff --git a/src/eval.c b/src/eval.c
index 38979b082..b3bf9d593 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -3113,6 +3113,8 @@ set_context_for_expression(
                || cmdidx == CMD_echo
                || cmdidx == CMD_echon
                || cmdidx == CMD_echomsg
+               || cmdidx == CMD_echoerr
+               || cmdidx == CMD_echoconsole
                || cmdidx == CMD_echowindow)
            && xp->xp_context == EXPAND_EXPRESSION)
     {
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index bdba4abff..58629b5fd 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -1333,11 +1333,12 @@ 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
diff --git a/src/version.c b/src/version.c
index 47d7e9f75..2dd8c9764 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1847,
 /**/
     1846,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1v7wqu-00AFwZ-02%40256bit.org.

Raspunde prin e-mail lui