0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2532: Vim9: confusing error if :k is used with a range

Problem:    Vim9: confusing error if :k is used with a range.
Solution:   Give an error about the range. (issue #7874)
This commit is contained in:
Bram Moolenaar
2021-02-20 08:16:51 +01:00
parent 10b9421f3b
commit ada1d870b4
4 changed files with 15 additions and 1 deletions

View File

@@ -92,10 +92,16 @@ not_in_vim9(exarg_T *eap)
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);