diff src/eval.c @ 25620:49a798fa0e73 v8.2.3346

patch 8.2.3346: Vim9: no error for using "." for concatenation after ":vim9cmd" Commit: https://github.com/vim/vim/commit/2596a4e763e11eb8e406f262cb72fd2b39461572 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 14 21:35:40 2021 +0200 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)
author Bram Moolenaar <Bram@vim.org>
date Sat, 14 Aug 2021 21:45:03 +0200
parents 54fef15ed370
children 15b54e0a576b
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -2860,7 +2860,8 @@ eval5(char_u **arg, typval_T *rettv, eva
 	// "++" 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;