patch 8.2.0601: Vim9: :unlet is not compiled
Problem: Vim9: :unlet is not compiled.
Solution: Implement :unlet instruction and check for errors.
diff --git a/src/vim9execute.c b/src/vim9execute.c
index b0e35b6..e675869 100644
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -1068,6 +1068,12 @@
}
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 @@
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));