To: vim_dev@googlegroups.com Subject: Patch 8.2.1156 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1156 Problem: Vim9: No error for invalid command in compiled function. Solution: Handle CMD_SIZE. Files: src/vim9compile.c, src/testdir/test_vim9_expr.vim *** ../vim-8.2.1155/src/vim9compile.c 2020-07-08 17:36:17.734105013 +0200 --- src/vim9compile.c 2020-07-08 17:42:22.548967928 +0200 *************** *** 7142,7147 **** --- 7142,7151 ---- // 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; *** ../vim-8.2.1155/src/testdir/test_vim9_expr.vim 2020-07-05 16:51:23.610238546 +0200 --- src/testdir/test_vim9_expr.vim 2020-07-08 17:46:03.136308944 +0200 *************** *** 1420,1426 **** call CheckDefFailure(["let x = '1'is2"], 'E488:') call CheckDefFailure(["let x = '1'isnot2"], 'E488:') ! call CheckDefExecFailure(["CallMe ('yes')"], 'E492:') call CheckDefFailure(["CallMe2('yes','no')"], 'E1069:') call CheckDefFailure(["CallMe2('yes' , 'no')"], 'E1068:') --- 1420,1426 ---- call CheckDefFailure(["let x = '1'is2"], 'E488:') call CheckDefFailure(["let x = '1'isnot2"], 'E488:') ! call CheckDefFailure(["CallMe ('yes')"], 'E476:') call CheckDefFailure(["CallMe2('yes','no')"], 'E1069:') call CheckDefFailure(["CallMe2('yes' , 'no')"], 'E1068:') *** ../vim-8.2.1155/src/version.c 2020-07-08 17:36:17.738105000 +0200 --- src/version.c 2020-07-08 17:46:22.264252490 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1156, /**/ -- EXPERIENCE - experience is a wonderful thing. It enables you to recognise a mistake when you make it again. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///