Commit: patch 9.1.2040: :tlunmenu incorrectly accepts a range

1 view
Skip to first unread message

Christian Brabandt

unread,
Jan 2, 2026, 9:01:05 AM (yesterday) Jan 2
to vim...@googlegroups.com
patch 9.1.2040: :tlunmenu incorrectly accepts a range

Commit: https://github.com/vim/vim/commit/19442ad11830bc9fc1474dfae9e813c31bc858b8
Author: Doug Kearns <dougk...@gmail.com>
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 <dougk...@gmail.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

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,
/**/
Reply all
Reply to author
Forward
0 new messages