mirror of
https://github.com/vim/vim.git
synced 2025-10-04 05:25:06 -04:00
patch 8.2.2677: Vim9: cannot use only some of the default arguments
Problem: Vim9: cannot use only some of the default arguments. Solution: Use v:none to use default argument value. Remove uf_def_arg_idx[], use JUMP_IF_ARG_SET. (closes #6504)
This commit is contained in:
@@ -92,6 +92,7 @@ typedef enum {
|
||||
|
||||
// expression operations
|
||||
ISN_JUMP, // jump if condition is matched isn_arg.jump
|
||||
ISN_JUMP_IF_ARG_SET, // jump if argument is already set, uses isn_arg.jumparg
|
||||
|
||||
// loop
|
||||
ISN_FOR, // get next item from a list, uses isn_arg.forloop
|
||||
@@ -203,6 +204,12 @@ typedef struct {
|
||||
int jump_where; // position to jump to
|
||||
} jump_T;
|
||||
|
||||
// arguments to ISN_JUMP_IF_ARG_SET
|
||||
typedef struct {
|
||||
int jump_arg_off; // argument index, negative
|
||||
int jump_where; // position to jump to
|
||||
} jumparg_T;
|
||||
|
||||
// arguments to ISN_FOR
|
||||
typedef struct {
|
||||
int for_idx; // loop variable index
|
||||
@@ -346,6 +353,7 @@ struct isn_S {
|
||||
job_T *job;
|
||||
partial_T *partial;
|
||||
jump_T jump;
|
||||
jumparg_T jumparg;
|
||||
forloop_T forloop;
|
||||
try_T try;
|
||||
trycont_T trycont;
|
||||
|
Reference in New Issue
Block a user