0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.0601: Vim9: :unlet is not compiled

Problem:    Vim9: :unlet is not compiled.
Solution:   Implement :unlet instruction and check for errors.
This commit is contained in:
Bram Moolenaar
2020-04-19 16:28:59 +02:00
parent d3aac2917d
commit d72c1bf0a6
10 changed files with 232 additions and 35 deletions

View File

@@ -1068,6 +1068,12 @@ call_def_function(
}
break;
case ISN_UNLET:
if (do_unlet(iptr->isn_arg.unlet.ul_name,
iptr->isn_arg.unlet.ul_forceit) == FAIL)
goto failed;
break;
// create a list from items on the stack; uses a single allocation
// for the list header and the items
case ISN_NEWLIST:
@@ -2108,6 +2114,11 @@ ex_disassemble(exarg_T *eap)
case ISN_PUSHEXC:
smsg("%4d PUSH v:exception", current);
break;
case ISN_UNLET:
smsg("%4d UNLET%s %s", current,
iptr->isn_arg.unlet.ul_forceit ? "!" : "",
iptr->isn_arg.unlet.ul_name);
break;
case ISN_NEWLIST:
smsg("%4d NEWLIST size %lld", current,
(long long)(iptr->isn_arg.number));