mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.3004: Vim9: error for missing colon given while skipping
Problem: Vim9: error for missing colon given while skipping. Solution: Do not give the error when skipping. (closes #8385)
This commit is contained in:
@@ -1844,7 +1844,7 @@ do_one_cmd(
|
|||||||
|
|
||||||
// If a ':' before the range is missing, give a clearer error
|
// If a ':' before the range is missing, give a clearer error
|
||||||
// message.
|
// message.
|
||||||
if (ar > ea.cmd)
|
if (ar > ea.cmd && !ea.skip)
|
||||||
{
|
{
|
||||||
semsg(_(e_colon_required_before_range_str), ea.cmd);
|
semsg(_(e_colon_required_before_range_str), ea.cmd);
|
||||||
goto doend;
|
goto doend;
|
||||||
|
@@ -590,6 +590,19 @@ def Test_try_catch_throw()
|
|||||||
return 2
|
return 2
|
||||||
enddef
|
enddef
|
||||||
assert_equal(4, ReturnInFinally())
|
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
|
enddef
|
||||||
|
|
||||||
" :while at the very start of a function that :continue jumps to
|
" :while at the very start of a function that :continue jumps to
|
||||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3004,
|
||||||
/**/
|
/**/
|
||||||
3003,
|
3003,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user