diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-12-01 15:22:56 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-01 15:22:56 +0000 |
commit | e4eed8c6db693a9183b776032570ce2f89dcffb6 (patch) | |
tree | 8edb253b95ca4b3dcfa430b8c9b3c9151d6257d9 /src/vim9execute.c | |
parent | f0e496a85a89fb1fd21b6af6363dcfc276331110 (diff) | |
download | vim-git-e4eed8c6db693a9183b776032570ce2f89dcffb6.tar.gz |
patch 8.2.3716: Vim9: range without a command is not compiledv8.2.3716
Problem: Vim9: range without a command is not compiled.
Solution: Add the ISN_EXECRANGE byte code.
Diffstat (limited to 'src/vim9execute.c')
-rw-r--r-- | src/vim9execute.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/vim9execute.c b/src/vim9execute.c index de4de16e3..4b2763b1f 100644 --- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -1774,6 +1774,28 @@ exec_instructions(ectx_T *ectx) } break; + // execute Ex command line that is only a range + case ISN_EXECRANGE: + { + exarg_T ea; + char *error = NULL; + + CLEAR_FIELD(ea); + ea.cmdidx = CMD_SIZE; + ea.addr_type = ADDR_LINES; + ea.cmd = iptr->isn_arg.string; + parse_cmd_address(&ea, &error, FALSE); + if (error == NULL) + error = ex_range_without_command(&ea); + if (error != NULL) + { + SOURCING_LNUM = iptr->isn_lnum; + emsg(error); + goto on_error; + } + } + break; + // Evaluate an expression with legacy syntax, push it onto the // stack. case ISN_LEGACY_EVAL: @@ -5068,6 +5090,9 @@ list_instructions(char *pfx, isn_T *instr, int instr_count, ufunc_T *ufunc) case ISN_EXEC_SPLIT: smsg("%s%4d EXEC_SPLIT %s", pfx, current, iptr->isn_arg.string); break; + case ISN_EXECRANGE: + smsg("%s%4d EXECRANGE %s", pfx, current, iptr->isn_arg.string); + break; case ISN_LEGACY_EVAL: smsg("%s%4d EVAL legacy %s", pfx, current, iptr->isn_arg.string); |