vim-patch:8.2.2533: Vim9: cannot use a range with :unlet

Problem:    Vim9: cannot use a range with :unlet.
Solution:   Implement ISN_UNLETRANGE.

5b5ae29bd3

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2023-06-12 15:38:53 +08:00
parent 551cc3a2a3
commit a0cb53eca7
3 changed files with 44 additions and 25 deletions

View File

@@ -1604,13 +1604,7 @@ char *get_lval(char *const name, typval_T *const rettv, lval_T *const lp, const
lp->ll_dict = NULL;
lp->ll_list = lp->ll_tv->vval.v_list;
lp->ll_li = tv_list_find(lp->ll_list, (int)lp->ll_n1);
if (lp->ll_li == NULL) {
if (lp->ll_n1 < 0) {
lp->ll_n1 = 0;
lp->ll_li = tv_list_find(lp->ll_list, (int)lp->ll_n1);
}
}
lp->ll_li = tv_list_find_index(lp->ll_list, &lp->ll_n1);
if (lp->ll_li == NULL) {
tv_clear(&var2);
if (!quiet) {