diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-06-22 23:02:51 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-06-22 23:02:51 +0200 |
commit | df069eec3b90401e880e9b0e258146d8f36c474d (patch) | |
tree | 9c61c092a5982318a5f7ee92f51b553621b019f5 /src/ex_docmd.c | |
parent | 7eaafe65eef88493c789b160914c8e2e8e42d4a7 (diff) | |
download | vim-git-df069eec3b90401e880e9b0e258146d8f36c474d.tar.gz |
patch 8.2.1042: Vim9: cannot put an operator on the next linev8.2.1042
Problem: Vim9: cannot put an operator on the next line.
Solution: Require a colon before a range to see if that causes problems.
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 93f33ae42..4755a01b4 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -1729,7 +1729,14 @@ do_one_cmd( #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 @@ excmd_get_argt(cmdidx_T idx) * 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 * |