1
0
forked from aniani/vim

patch 8.2.4510: Vim9: shortening commands leads to confusing script

Problem:    Vim9: shortening commands leads to confusing script.
Solution:   In Vim9 script require at least ":cont" for ":continue", "const"
            instead of "cons", "break" instead of "brea", "catch" instead of
            "cat", "else" instead of "el" "elseif" instead of "elsei" "endfor"
            instead of "endfo" "endif" instead of "en" "endtry" instead of
            "endt", "finally" instead of "fina", "throw" instead of "th",
            "while" instead of "wh".
This commit is contained in:
Bram Moolenaar
2022-03-05 12:56:44 +00:00
parent e1d1211799
commit 204852ae2a
7 changed files with 70 additions and 37 deletions

View File

@@ -1883,13 +1883,6 @@ compile_assignment(char_u *arg, exarg_T *eap, cmdidx_T cmdidx, cctx_T *cctx)
lhs_T lhs;
long start_lnum = SOURCING_LNUM;
p = eap->cmd;
if (eap->cmdidx == CMD_var && arg > p && !checkforcmd_noparen(&p, "var", 3))
{
emsg(_(e_must_use_var_instead_of_va));
return NULL;
}
// Skip over the "varname" or "[varname, varname]" to get to any "=".
p = skip_var_list(arg, TRUE, &var_count, &semicolon, TRUE);
if (p == NULL)