To: vim_dev@googlegroups.com Subject: Patch 8.2.3004 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3004 Problem: Vim9: error for missing colon given while skipping. Solution: Do not give the error when skipping. (closes #8385) Files: src/ex_docmd.c, src/testdir/test_vim9_script.vim *** ../vim-8.2.3003/src/ex_docmd.c 2021-06-07 22:04:48.406620074 +0200 --- src/ex_docmd.c 2021-06-15 20:01:15.912631596 +0200 *************** *** 1844,1850 **** // If a ':' before the range is missing, give a clearer error // message. ! if (ar > ea.cmd) { semsg(_(e_colon_required_before_range_str), ea.cmd); goto doend; --- 1844,1850 ---- // If a ':' before the range is missing, give a clearer error // message. ! if (ar > ea.cmd && !ea.skip) { semsg(_(e_colon_required_before_range_str), ea.cmd); goto doend; *** ../vim-8.2.3003/src/testdir/test_vim9_script.vim 2021-06-03 21:56:06.664423437 +0200 --- src/testdir/test_vim9_script.vim 2021-06-15 20:06:04.946952607 +0200 *************** *** 590,595 **** --- 590,608 ---- return 2 enddef assert_equal(4, ReturnInFinally()) + + var lines =<< trim END + vim9script + try + acos('0.5') + ->setline(1) + catch + g:caught = v:exception + endtry + END + CheckScriptSuccess(lines) + assert_match('E808: Number or Float required', g:caught) + unlet g:caught enddef " :while at the very start of a function that :continue jumps to *** ../vim-8.2.3003/src/version.c 2021-06-15 19:32:35.638516519 +0200 --- src/version.c 2021-06-15 20:04:34.743439897 +0200 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 3004, /**/ -- Engineers will go without food and hygiene for days to solve a problem. (Other times just because they forgot.) (Scott Adams - The Dilbert principle) /// 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 ///