Mercurial > vim
diff src/vim9.h @ 23156:6aa8ddf7a3fa v8.2.2124
patch 8.2.2124: Vim9: a range cannot be computed at runtime
Commit: https://github.com/vim/vim/commit/08597875b2a1e7d118b0346c652a96e7527e7d8b
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Dec 10 19:43:40 2020 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 10 Dec 2020 19:45:04 +0100 |
parents | a943b175586a |
children | b545334ae654 |
line wrap: on
line diff
--- a/src/vim9.h +++ b/src/vim9.h @@ -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(d 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