summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-08-15 13:49:42 +0200
committerBram Moolenaar <Bram@vim.org>2021-08-15 13:49:42 +0200
commitdd9de50f4262898384be6ea7694d05507c7cb260 (patch)
tree7065a785ee6bd7f1a9dd30ff09bf800aa6bd9699 /src/eval.c
parent2596a4e763e11eb8e406f262cb72fd2b39461572 (diff)
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/eval.c')
-rw-r--r--src/eval.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/eval.c b/src/eval.c
index 020f55720c..12931aff51 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2860,8 +2860,7 @@ eval5(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
// "++" and "--" on the next line are a separate command.
p = eval_next_non_blank(*arg, evalarg, &getnext);
op = *p;
- concat = op == '.' && (*(p + 1) == '.'
- || (current_sctx.sc_version < 2 && !vim9script));
+ concat = op == '.' && (*(p + 1) == '.' || in_old_script(2));
if ((op != '+' && op != '-' && !concat) || p[1] == '='
|| (p[1] == '.' && p[2] == '='))
break;
@@ -3402,7 +3401,7 @@ eval7(
if (**arg == '.' && (!isdigit(*(*arg + 1))
#ifdef FEAT_FLOAT
- || current_sctx.sc_version < 2
+ || in_old_script(2)
#endif
))
{
@@ -5877,7 +5876,7 @@ handle_subscript(
|| (**arg == '.' && (rettv->v_type == VAR_DICT
|| (!evaluate
&& (*arg)[1] != '.'
- && current_sctx.sc_version >= 2))))
+ && !in_old_script(2)))))
{
dict_unref(selfdict);
if (rettv->v_type == VAR_DICT)