diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-08-15 13:49:42 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-08-15 13:49:42 +0200 |
commit | dd9de50f4262898384be6ea7694d05507c7cb260 (patch) | |
tree | 7065a785ee6bd7f1a9dd30ff09bf800aa6bd9699 /src/evalvars.c | |
parent | 2596a4e763e11eb8e406f262cb72fd2b39461572 (diff) | |
download | vim-git-8.2.3347.tar.gz |
patch 8.2.3347: check for legacy script is incompletev8.2.3347
Problem: Check for legacy script is incomplete. (Naohiro Ono)
Solution: Also check the :legacy modifier. Use for string concatenation
with "." and others (issue #8756)
Diffstat (limited to 'src/evalvars.c')
-rw-r--r-- | src/evalvars.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/evalvars.c b/src/evalvars.c index 90dc7fbd1..2de7999a0 100644 --- a/src/evalvars.c +++ b/src/evalvars.c @@ -774,7 +774,7 @@ ex_let(exarg_T *eap) --argend; expr = skipwhite(argend); concat = expr[0] == '.' - && ((expr[1] == '=' && current_sctx.sc_version < 2) + && ((expr[1] == '=' && in_old_script(2)) || (expr[1] == '.' && expr[2] == '=')); has_assign = *expr == '=' || (vim_strchr((char_u *)"+-*/%", *expr) != NULL && expr[1] == '='); @@ -2932,7 +2932,7 @@ find_var_ht(char_u *name, char_u **varname) // "version" is "v:version" in all scopes if scriptversion < 3. // Same for a few other variables marked with VV_COMPAT. - if (current_sctx.sc_version < 3) + if (in_old_script(3)) { hi = hash_find(&compat_hashtab, name); if (!HASHITEM_EMPTY(hi)) |