mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.1156: Vim9: No error for invalid command in compiled function
Problem: Vim9: No error for invalid command in compiled function. Solution: Handle CMD_SIZE.
This commit is contained in:
@@ -1420,7 +1420,7 @@ func Test_expr_fails()
|
||||
call CheckDefFailure(["let x = '1'is2"], 'E488:')
|
||||
call CheckDefFailure(["let x = '1'isnot2"], 'E488:')
|
||||
|
||||
call CheckDefExecFailure(["CallMe ('yes')"], 'E492:')
|
||||
call CheckDefFailure(["CallMe ('yes')"], 'E476:')
|
||||
call CheckDefFailure(["CallMe2('yes','no')"], 'E1069:')
|
||||
call CheckDefFailure(["CallMe2('yes' , 'no')"], 'E1068:')
|
||||
|
||||
|
@@ -754,6 +754,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1156,
|
||||
/**/
|
||||
1155,
|
||||
/**/
|
||||
|
@@ -7142,6 +7142,10 @@ compile_def_function(ufunc_T *ufunc, int set_return_type, cctx_T *outer_cctx)
|
||||
|
||||
// TODO: other commands with an expression argument
|
||||
|
||||
case CMD_SIZE:
|
||||
semsg(_("E476: Invalid command: %s"), ea.cmd);
|
||||
goto erret;
|
||||
|
||||
default:
|
||||
// Not recognized, execute with do_cmdline_cmd().
|
||||
ea.arg = p;
|
||||
|
Reference in New Issue
Block a user