mirror of
https://github.com/neovim/neovim.git
synced 2026-11-02 09:49:02 -06: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
https://github.com/vim/vim/commit/19442ad11830bc9fc1474dfae9e813c31bc858b8
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
1 parent
cde32b3307
commit
6deb1c1bf3
2 files changed
+8
-2
No files matched your search
@@ -2917,8 +2917,8 @@ M.cmds = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
command = 'tlunmenu',
|
command = 'tlunmenu',
|
||||||
flags = bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, CTRLV, CMDWIN, LOCK_OK),
|
flags = bit.bor(EXTRA, TRLBAR, NOTRLCOM, CTRLV, CMDWIN, LOCK_OK),
|
||||||
addr_type = 'ADDR_OTHER',
|
addr_type = 'ADDR_NONE',
|
||||||
func = 'ex_menu',
|
func = 'ex_menu',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -160,6 +160,12 @@ func Test_menu_errors()
|
|||||||
unmenu Test
|
unmenu Test
|
||||||
endfunc
|
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
|
" Test for menu item completion in command line
|
||||||
func Test_menu_expand()
|
func Test_menu_expand()
|
||||||
" Create the menu items for test
|
" Create the menu items for test
|
||||||
|
|||||||
Reference in new issue
Block a user