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

patch 8.2.3346: Vim9: no error for using "." for concatenation after ":vim9cmd"

Problem:    Vim9: no error for using "." for concatenation after ":vim9cmd".
            (Naohiro Ono)
Solution:   Check for Vim9 script syntax. (closes #8756)
This commit is contained in:
Bram Moolenaar
2021-08-14 21:35:40 +02:00
parent 6aa57295cf
commit 2596a4e763
3 changed files with 5 additions and 1 deletions

View File

@@ -2860,7 +2860,8 @@ 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);
concat = op == '.' && (*(p + 1) == '.'
|| (current_sctx.sc_version < 2 && !vim9script));
if ((op != '+' && op != '-' && !concat) || p[1] == '='
|| (p[1] == '.' && p[2] == '='))
break;