mirror of
https://github.com/neovim/neovim.git
synced 2026-03-31 04:42:03 +00:00
vim-patch:9.1.2040: :tlunmenu incorrectly accepts a range (#37206)
Problem: :tlnumenu incorrectly accepts a range.
Solution: Remove EX_RANGE and EX_ZEROR from the command definition and
use ADDR_NONE (Doug Kearns).
closes: vim/vim#19055
19442ad118
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
@@ -2917,8 +2917,8 @@ M.cmds = {
|
||||
},
|
||||
{
|
||||
command = 'tlunmenu',
|
||||
flags = bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, CTRLV, CMDWIN, LOCK_OK),
|
||||
addr_type = 'ADDR_OTHER',
|
||||
flags = bit.bor(EXTRA, TRLBAR, NOTRLCOM, CTRLV, CMDWIN, LOCK_OK),
|
||||
addr_type = 'ADDR_NONE',
|
||||
func = 'ex_menu',
|
||||
},
|
||||
{
|
||||
|
||||
@@ -160,6 +160,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
|
||||
|
||||
Reference in New Issue
Block a user