0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.3347: check for legacy script is incomplete

Problem:    Check for legacy script is incomplete. (Naohiro Ono)
Solution:   Also check the :legacy modifier.  Use for string concatenation
            with "." and others (issue #8756)
This commit is contained in:
Bram Moolenaar
2021-08-15 13:49:42 +02:00
parent 2596a4e763
commit dd9de50f42
9 changed files with 77 additions and 9 deletions

View File

@@ -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)