Problem: Vim9: confusing error if :k is used with a range.
Solution: Give an error about the range. (issue #7874)
END
CheckDefAndScriptFailure(lines, 'E1100:')
+ lines =<< trim END
+ :1ka
+ END
+ CheckDefAndScriptFailure(lines, 'E481:')
+
lines =<< trim END
t
END
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2532,
/**/
2531,
/**/
semsg(_(e_colon_required_before_range_str), cmd);
goto erret;
}
+ ea.addr_count = 1;
if (ends_excmd2(line, ea.cmd))
{
// A range without a command: jump to the line.
if (in_vim9script())
switch (eap->cmdidx)
{
+ case CMD_k:
+ if (eap->addr_count > 0)
+ {
+ emsg(_(e_norange));
+ return FAIL;
+ }
+ // FALLTHROUGH
case CMD_append:
case CMD_change:
case CMD_insert:
- case CMD_k:
case CMD_t:
case CMD_xit:
semsg(_(e_command_not_supported_in_vim9_script_missing_var_str), eap->cmd);