mirror of
https://github.com/vim/vim.git
synced 2025-11-15 23:14:06 -05:00
patch 9.1.1915: :breaklist accepts unprocessed arguments.
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: #18746
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
d5821638e2
commit
de7049ede1
@@ -234,7 +234,7 @@ EXCMD(CMD_breakdel, "breakdel", ex_breakdel,
|
||||
EX_EXTRA|EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK,
|
||||
ADDR_NONE),
|
||||
EXCMD(CMD_breaklist, "breaklist", ex_breaklist,
|
||||
EX_EXTRA|EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK,
|
||||
EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK,
|
||||
ADDR_NONE),
|
||||
EXCMD(CMD_browse, "browse", ex_wrongmodifier,
|
||||
EX_NEEDARG|EX_EXTRA|EX_NOTRLCOM|EX_CMDWIN|EX_LOCK_OK,
|
||||
|
||||
@@ -5176,4 +5176,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
|
||||
|
||||
@@ -729,6 +729,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1915,
|
||||
/**/
|
||||
1914,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user