diff options
Diffstat (limited to 'src/nvim/eval.c')
| -rw-r--r-- | src/nvim/eval.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 2c12534b21..9c678168bb 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -2818,6 +2818,18 @@ static void ex_unletlock(exarg_T *eap, char_u *argstart, int deep) lval_T lv; do { + if (*arg == '$') { + const char *name = (char *)++arg; + + if (get_env_len((const char_u **)&arg) == 0) { + EMSG2(_(e_invarg2), name - 1); + return; + } + os_unsetenv(name); + arg = skipwhite(arg); + continue; + } + // Parse the name and find the end. char_u *const name_end = (char_u *)get_lval(arg, NULL, &lv, true, eap->skip || error, @@ -14664,6 +14676,7 @@ static void set_qf_ll_list(win_T *wp, typval_T *args, typval_T *rettv) static char *e_invact = N_("E927: Invalid action: '%s'"); const char *title = NULL; int action = ' '; + static int recursive = 0; rettv->vval.v_number = -1; dict_T *d = NULL; @@ -14671,6 +14684,9 @@ static void set_qf_ll_list(win_T *wp, typval_T *args, typval_T *rettv) if (list_arg->v_type != VAR_LIST) { EMSG(_(e_listreq)); return; + } else if (recursive != 0) { + EMSG(_(e_au_recursive)); + return; } typval_T *action_arg = &args[1]; @@ -14712,10 +14728,12 @@ skip_args: title = (wp ? "setloclist()" : "setqflist()"); } + recursive++; list_T *const l = list_arg->vval.v_list; if (set_errorlist(wp, l, action, (char_u *)title, d) == OK) { rettv->vval.v_number = 0; } + recursive--; } /* |