patch 9.1.2040: :tlunmenu incorrectly accepts a range

Commit: 
https://github.com/vim/vim/commit/19442ad11830bc9fc1474dfae9e813c31bc858b8
Author: Doug Kearns <[email protected]>
Date:   Fri Jan 2 13:45:46 2026 +0000

    patch 9.1.2040: :tlunmenu incorrectly accepts a range
    
    Problem:  :tlnumenu incorrectly accepts a range.
    Solution: Remove EX_RANGE and EX_ZEROR from the command definition and
              use ADDR_NONE (Doug Kearns).
    
    closes: #19055
    
    Signed-off-by: Doug Kearns <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/ex_cmds.h b/src/ex_cmds.h
index 8eda9ccee..4471e2adb 100644
--- a/src/ex_cmds.h
+++ b/src/ex_cmds.h
@@ -1647,8 +1647,8 @@ EXCMD(CMD_tlnoremenu,     "tlnoremenu",   ex_menu,
        
EX_RANGE|EX_ZEROR|EX_EXTRA|EX_TRLBAR|EX_NOTRLCOM|EX_CTRLV|EX_CMDWIN|EX_LOCK_OK,
        ADDR_OTHER),
 EXCMD(CMD_tlunmenu,    "tlunmenu",     ex_menu,
-       
EX_RANGE|EX_ZEROR|EX_EXTRA|EX_TRLBAR|EX_NOTRLCOM|EX_CTRLV|EX_CMDWIN|EX_LOCK_OK,
-       ADDR_OTHER),
+       EX_EXTRA|EX_TRLBAR|EX_NOTRLCOM|EX_CTRLV|EX_CMDWIN|EX_LOCK_OK,
+       ADDR_NONE),
 EXCMD(CMD_tmenu,       "tmenu",        ex_menu,
        
EX_RANGE|EX_ZEROR|EX_EXTRA|EX_TRLBAR|EX_NOTRLCOM|EX_CTRLV|EX_CMDWIN|EX_LOCK_OK,
        ADDR_OTHER),
diff --git a/src/testdir/test_menu.vim b/src/testdir/test_menu.vim
index e42dd0cc4..627d81476 100644
--- a/src/testdir/test_menu.vim
+++ b/src/testdir/test_menu.vim
@@ -159,6 +159,12 @@ func Test_menu_errors()
   unmenu Test
 endfunc
 
+func Test_unmenu_range_errors()
+  for prefix in ['', 'a', 'c', 'i', 'n', 's', 't', 'tl', 'v', 'x']
+    call assert_fails('42' .. prefix .. 'unmenu', 'E481:')
+  endfor
+endfunc
+
 " Test for menu item completion in command line
 func Test_menu_expand()
   " Create the menu items for test
diff --git a/src/version.c b/src/version.c
index 99804297e..7ab092ac5 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2040,
 /**/
     2039,
 /**/

-- 
-- 
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/E1vbfhD-00ASqO-3R%40256bit.org.

Raspunde prin e-mail lui