mirror of
https://github.com/neovim/neovim.git
synced 2025-12-11 09:02:40 +00:00
vim-patch:9.1.1915: :breaklist accepts unprocessed arguments. (#36561)
Problem: :breaklist accepts unprocessed arguments.
Solution: Remove EX_EXTRA flag from the Ex command definition.
(Doug Kearns)
The command should emit an "E488: Trailing characters" error rather than
silently accept arguments.
closes: vim/vim#18746
de7049ede1
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
@@ -264,7 +264,7 @@ M.cmds = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
command = 'breaklist',
|
command = 'breaklist',
|
||||||
flags = bit.bor(EXTRA, TRLBAR, CMDWIN, LOCK_OK),
|
flags = bit.bor(TRLBAR, CMDWIN, LOCK_OK),
|
||||||
addr_type = 'ADDR_NONE',
|
addr_type = 'ADDR_NONE',
|
||||||
func = 'ex_breaklist',
|
func = 'ex_breaklist',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -5142,4 +5142,9 @@ func Test_update_screen_after_wildtrigger()
|
|||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_breaklist_args_fails()
|
||||||
|
call assert_match('No breakpoints defined', execute(':breaklist'))
|
||||||
|
call assert_fails(':breaklist extra', 'E488:')
|
||||||
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
|||||||
Reference in New Issue
Block a user