0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2124: Vim9: a range cannot be computed at runtime

Problem:    Vim9: a range cannot be computed at runtime.
Solution:   Add the ISN_RANGE instruction.
This commit is contained in:
Bram Moolenaar
2020-12-10 19:43:40 +01:00
parent d356fc65d2
commit 08597875b2
6 changed files with 128 additions and 12 deletions

View File

@@ -18,6 +18,7 @@ typedef enum {
ISN_EXECUTE, // execute Ex commands isn_arg.number items on top of stack
ISN_ECHOMSG, // echo Ex commands isn_arg.number items on top of stack
ISN_ECHOERR, // echo Ex commands isn_arg.number items on top of stack
ISN_RANGE, // compute range from isn_arg.string, push to stack
// get and set variables
ISN_LOAD, // push local variable isn_arg.number
@@ -366,3 +367,8 @@ garray_T def_functions = {0, 0, sizeof(dfunc_T), 50, NULL};
extern garray_T def_functions;
#endif
// Used for "lnum" when a range is to be taken from the stack.
#define LNUM_VARIABLE_RANGE -999
// Used for "lnum" when a range is to be taken from the stack and "!" is used.
#define LNUM_VARIABLE_RANGE_ABOVE -888