Mercurial > vim
diff src/vim9execute.c @ 20091:a64c16ff98b8 v8.2.0601
patch 8.2.0601: Vim9: :unlet is not compiled
Commit: https://github.com/vim/vim/commit/d72c1bf0a6784afdc8d8ceab4a007cd76d5b81e1
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Apr 19 16:28:59 2020 +0200
patch 8.2.0601: Vim9: :unlet is not compiled
Problem: Vim9: :unlet is not compiled.
Solution: Implement :unlet instruction and check for errors.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 19 Apr 2020 16:30:04 +0200 |
parents | 7fc5d62fe2a5 |
children | 058b41f85bcb |
line wrap: on
line diff
--- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -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));