patch 8.2.1637: Vim9: :put ={expr} does not work inside :def function
Problem: Vim9: :put ={expr} does not work inside :def function.
Solution: Add ISN_PUT. (closes #6397)
diff --git a/src/vim9.h b/src/vim9.h
index b7bd84e..367c05c 100644
--- a/src/vim9.h
+++ b/src/vim9.h
@@ -135,6 +135,8 @@
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 @@
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 @@
newfunc_T newfunc;
checklen_T checklen;
shuffle_T shuffle;
+ put_T put;
} isn_arg;
};