Patch 8.2.3004

4 views
Skip to first unread message

Bram Moolenaar

unread,
Jun 15, 2021, 2:07:07 PM6/15/21
to vim...@googlegroups.com

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 -- Br...@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 ///
Reply all
Reply to author
Forward
0 new messages