summaryrefslogtreecommitdiffstats
path: root/src/map.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-01-19 22:51:48 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-19 22:51:48 +0000
commitf61c89d2e698e287a9d04c0a29f4ecc0130c2ea2 (patch)
tree81dccba7f2ae6b868dd30b0f14db444b2f3383fb /src/map.c
parentbed34f0a8a4e38a72a080184881bc68254a8cdc6 (diff)
patch 8.2.4148: deleting any mapping may cause <ScritpCmd> to failv8.2.4148
Problem: Deleting any mapping may cause <ScritpCmd> to not set the script context. Solution: Only reset last_used_map if it is the deleted mapping. (closes #9568)
Diffstat (limited to 'src/map.c')
-rw-r--r--src/map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map.c b/src/map.c
index f16397a231..ff117dc6da 100644
--- a/src/map.c
+++ b/src/map.c
@@ -86,7 +86,7 @@ map_free(mapblock_T **mpp)
*mpp = mp->m_next;
vim_free(mp);
#ifdef FEAT_EVAL
- reset_last_used_map();
+ reset_last_used_map(mp);
#endif
}