To: vim_dev@googlegroups.com Subject: Patch 8.2.4314 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4314 (after 8.2.4312) Problem: Test fails where lines are skipped. Solution: Only give an error when not skipping commands. Files: src/vim9compile.c, src/testdir/test_vim9_script.vim *** ../vim-8.2.4313/src/vim9compile.c 2022-02-06 17:30:37.697660685 +0000 --- src/vim9compile.c 2022-02-06 20:27:30.163398973 +0000 *************** *** 3139,3146 **** break; case CMD_vim9script: ! emsg(_(e_vim9script_can_only_be_used_in_script)); ! goto erret; case CMD_global: if (check_global_and_subst(ea.cmd, p) == FAIL) --- 3139,3151 ---- break; case CMD_vim9script: ! if (cctx.ctx_skip != SKIP_YES) ! { ! emsg(_(e_vim9script_can_only_be_used_in_script)); ! goto erret; ! } ! line = (char_u *)""; ! break; case CMD_global: if (check_global_and_subst(ea.cmd, p) == FAIL) *** ../vim-8.2.4313/src/testdir/test_vim9_script.vim 2022-02-06 17:30:37.697660685 +0000 --- src/testdir/test_vim9_script.vim 2022-02-06 20:26:28.303447839 +0000 *************** *** 1228,1233 **** --- 1228,1238 ---- assert_fails('vim9script', 'E1038:') v9.CheckDefFailure(['vim9script'], 'E1038:') + + # no error when skipping + if has('nothing') + vim9script + endif enddef def Test_script_var_shadows_function() *** ../vim-8.2.4313/src/version.c 2022-02-06 18:36:46.297746545 +0000 --- src/version.c 2022-02-06 20:25:34.367489630 +0000 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 4314, /**/ -- hundred-and-one symptoms of being an internet addict: 16. You step out of your room and realize that your parents have moved and you don't have a clue when it happened. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///