1
0
forked from aniani/vim

patch 8.2.2834: Vim9: :cexpr does not work with local variables

Problem:    Vim9: :cexpr does not work with local variables.
Solution:   Compile :cexpr.
This commit is contained in:
Bram Moolenaar
2021-05-05 21:31:39 +02:00
parent 3a00659db7
commit 5f7d4c049e
8 changed files with 206 additions and 54 deletions

View File

@@ -172,6 +172,9 @@ typedef enum {
ISN_REDIRSTART, // :redir =>
ISN_REDIREND, // :redir END, isn_arg.number == 1 for append
ISN_CEXPR_AUCMD, // first part of :cexpr isn_arg.number is cmdidx
ISN_CEXPR_CORE, // second part of :cexpr, uses isn_arg.cexpr
ISN_FINISH // end marker in list of instructions
} isntype_T;
@@ -352,6 +355,18 @@ typedef struct {
isn_T *subs_instr; // sequence of instructions
} subs_T;
// indirect arguments to ISN_TRY
typedef struct {
int cer_cmdidx;
char_u *cer_cmdline;
int cer_forceit;
} cexprref_T;
// arguments to ISN_CEXPR_CORE
typedef struct {
cexprref_T *cexpr_ref;
} cexpr_T;
/*
* Instruction
*/
@@ -395,6 +410,7 @@ struct isn_S {
unpack_T unpack;
isn_outer_T outer;
subs_T subs;
cexpr_T cexpr;
} isn_arg;
};