summaryrefslogtreecommitdiff
path: root/src/vim9.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-08 22:45:35 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-08 22:45:35 +0200
commitc3516f7e4507c77424b94cb89071f6d0841f4e6a (patch)
tree08b13ec0f9f8b88e0ec8cbab01899960dae3423b /src/vim9.h
parent6defa7bf0a8935cc44f3dc12e9c87bbb40f190b7 (diff)
downloadvim-git-c3516f7e4507c77424b94cb89071f6d0841f4e6a.tar.gz
patch 8.2.1637: Vim9: :put ={expr} does not work inside :def functionv8.2.1637
Problem: Vim9: :put ={expr} does not work inside :def function. Solution: Add ISN_PUT. (closes #6397)
Diffstat (limited to 'src/vim9.h')
-rw-r--r--src/vim9.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vim9.h b/src/vim9.h
index b7bd84ed5..367c05ce0 100644
--- a/src/vim9.h
+++ b/src/vim9.h
@@ -135,6 +135,8 @@ typedef enum {
ISN_CHECKTYPE, // check value type is isn_arg.type.tc_type
ISN_CHECKLEN, // check list length is isn_arg.checklen.cl_min_len
+ ISN_PUT, // ":put", uses isn_arg.put
+
ISN_SHUFFLE, // move item on stack up or down
ISN_DROP // pop stack and discard value
} isntype_T;
@@ -261,6 +263,12 @@ typedef struct {
int shfl_up; // places to move upwards
} shuffle_T;
+// arguments to ISN_PUT
+typedef struct {
+ int put_regname; // register, can be NUL
+ linenr_T put_lnum; // line number to put below
+} put_T;
+
/*
* Instruction
*/
@@ -296,6 +304,7 @@ struct isn_S {
newfunc_T newfunc;
checklen_T checklen;
shuffle_T shuffle;
+ put_T put;
} isn_arg;
};