patch 8.2.1042: Vim9: cannot put an operator on the next line
Problem: Vim9: cannot put an operator on the next line.
Solution: Require a colon before a range to see if that causes problems.
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 93f33ae..4755a01 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -1729,7 +1729,14 @@
#ifdef FEAT_EVAL
if (current_sctx.sc_version == SCRIPT_VERSION_VIM9 && !starts_with_colon)
+ {
+ if (ea.cmd > cmd)
+ {
+ emsg(_(e_colon_required));
+ goto doend;
+ }
p = find_ex_command(&ea, NULL, lookup_scriptvar, NULL);
+ }
else
#endif
p = find_ex_command(&ea, NULL, NULL, NULL);
@@ -3446,7 +3453,7 @@
* Backslashed delimiters after / or ? will be skipped, and commands will
* not be expanded between /'s and ?'s or after "'".
*
- * Also skip white space and ":" characters.
+ * Also skip white space and ":" characters after the range.
* Returns the "cmd" pointer advanced to beyond the range.
*/
char_u *