Mercurial > vim
diff src/ex_docmd.c @ 20982:bb49b5090a9c v8.2.1042
patch 8.2.1042: Vim9: cannot put an operator on the next line
Commit: https://github.com/vim/vim/commit/df069eec3b90401e880e9b0e258146d8f36c474d
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jun 22 23:02:51 2020 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 22 Jun 2020 23:15:04 +0200 |
parents | 213fb059e02e |
children | 3af71cbcfdbe |
line wrap: on
line diff
--- 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 *