summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-01-06 21:38:11 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-06 21:38:11 +0000
commit2ef01d929d094c9063a259a74e23cf61be74b9b6 (patch)
tree35393d64ad070853af607c2aa383ee321162af86
parent84c62d59a3604d15c447f28e89679944a4926cc3 (diff)
patch 8.2.4021: missing part of the :import changesv8.2.4021
Problem: Missing part of the :import changes. Solution: Add changes in vim9cmds.c.
-rw-r--r--src/version.c2
-rw-r--r--src/vim9cmds.c20
2 files changed, 12 insertions, 10 deletions
diff --git a/src/version.c b/src/version.c
index d3732cb9c5..4a72d01b6d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 4021,
+/**/
4020,
/**/
4019,
diff --git a/src/vim9cmds.c b/src/vim9cmds.c
index 2802ac37de..3372ad42d3 100644
--- a/src/vim9cmds.c
+++ b/src/vim9cmds.c
@@ -141,17 +141,17 @@ compile_unlet(
//
ret = compile_lhs(p, &lhs, CMD_unlet, FALSE, 0, cctx);
- // : unlet an indexed item
- if (!lhs.lhs_has_index)
+ // Use the info in "lhs" to unlet the item at the index in the
+ // list or dict.
+ if (ret == OK)
{
- iemsg("called compile_lhs() without an index");
- ret = FAIL;
- }
- else
- {
- // Use the info in "lhs" to unlet the item at the index in the
- // list or dict.
- ret = compile_assign_unlet(p, &lhs, FALSE, &t_void, cctx);
+ if (!lhs.lhs_has_index)
+ {
+ semsg(_(e_cannot_unlet_imported_item_str), p);
+ ret = FAIL;
+ }
+ else
+ ret = compile_assign_unlet(p, &lhs, FALSE, &t_void, cctx);
}
vim_free(lhs.lhs_name);