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:
zeertzjq
2025-11-15 19:09:19 +08:00
committed by GitHub
parent e0ac78f707
commit dc682bcbcf
2 changed files with 6 additions and 1 deletions

View File

@@ -264,7 +264,7 @@ M.cmds = {
},
{
command = 'breaklist',
flags = bit.bor(EXTRA, TRLBAR, CMDWIN, LOCK_OK),
flags = bit.bor(TRLBAR, CMDWIN, LOCK_OK),
addr_type = 'ADDR_NONE',
func = 'ex_breaklist',
},

View File

@@ -5142,4 +5142,9 @@ func Test_update_screen_after_wildtrigger()
call StopVimInTerminal(buf)
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