mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.2216: Vim9: range with missing colon can be hard to spot
Problem: Vim9: range with missing colon can be hard to spot. Solution: Include the start of the range in the error. (closes #7543)
This commit is contained in:
@@ -133,8 +133,8 @@ EXTERN char e_item_not_found_in_script_str[]
|
|||||||
INIT(= N_("E1048: Item not found in script: %s"));
|
INIT(= N_("E1048: Item not found in script: %s"));
|
||||||
EXTERN char e_item_not_exported_in_script_str[]
|
EXTERN char e_item_not_exported_in_script_str[]
|
||||||
INIT(= N_("E1049: Item not exported in script: %s"));
|
INIT(= N_("E1049: Item not exported in script: %s"));
|
||||||
EXTERN char e_colon_required_before_a_range[]
|
EXTERN char e_colon_required_before_range_str[]
|
||||||
INIT(= N_("E1050: Colon required before a range"));
|
INIT(= N_("E1050: Colon required before a range: %s"));
|
||||||
EXTERN char e_wrong_argument_type_for_plus[]
|
EXTERN char e_wrong_argument_type_for_plus[]
|
||||||
INIT(= N_("E1051: Wrong argument type for +"));
|
INIT(= N_("E1051: Wrong argument type for +"));
|
||||||
EXTERN char e_cannot_declare_an_option[]
|
EXTERN char e_cannot_declare_an_option[]
|
||||||
|
@@ -1839,7 +1839,7 @@ do_one_cmd(
|
|||||||
// message.
|
// message.
|
||||||
if (ar > ea.cmd)
|
if (ar > ea.cmd)
|
||||||
{
|
{
|
||||||
emsg(_(e_colon_required_before_a_range));
|
semsg(_(e_colon_required_before_range_str), ea.cmd);
|
||||||
goto doend;
|
goto doend;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -549,7 +549,7 @@ def Test_modifier_silent_unsilent()
|
|||||||
enddef
|
enddef
|
||||||
|
|
||||||
def Test_range_after_command_modifier()
|
def Test_range_after_command_modifier()
|
||||||
CheckScriptFailure(['vim9script', 'silent keepjump 1d _'], 'E1050:', 2)
|
CheckScriptFailure(['vim9script', 'silent keepjump 1d _'], 'E1050: Colon required before a range: 1d _', 2)
|
||||||
new
|
new
|
||||||
setline(1, 'xxx')
|
setline(1, 'xxx')
|
||||||
CheckScriptSuccess(['vim9script', 'silent keepjump :1d _'])
|
CheckScriptSuccess(['vim9script', 'silent keepjump :1d _'])
|
||||||
|
@@ -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 */
|
||||||
|
/**/
|
||||||
|
2216,
|
||||||
/**/
|
/**/
|
||||||
2215,
|
2215,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -7727,7 +7727,7 @@ compile_def_function(ufunc_T *ufunc, int check_return_type, cctx_T *outer_cctx)
|
|||||||
{
|
{
|
||||||
if (!starts_with_colon)
|
if (!starts_with_colon)
|
||||||
{
|
{
|
||||||
emsg(_(e_colon_required_before_a_range));
|
semsg(_(e_colon_required_before_range_str), cmd);
|
||||||
goto erret;
|
goto erret;
|
||||||
}
|
}
|
||||||
if (ends_excmd2(line, ea.cmd))
|
if (ends_excmd2(line, ea.cmd))
|
||||||
|
Reference in New Issue
Block a user