summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-01-16 14:58:34 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-16 14:58:34 +0000
commitd648c01f2f3798a5c75422aa83211928ad783128 (patch)
tree6b438c1a7cbc78338227c62f5e353ac3ec9e5349
parent8f9956994d5c75ed88d6b2881b6ac0bb62a0d6af (diff)
patch 8.2.4111: potential proglem when map is deleted while executingv8.2.4111
Problem: Potential proglem when map is deleted while executing. Solution: Reset last used map pointer when deleting a mapping.
-rw-r--r--src/map.c3
-rw-r--r--src/version.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/map.c b/src/map.c
index 181aa654b6..6ad938d7ed 100644
--- a/src/map.c
+++ b/src/map.c
@@ -85,6 +85,9 @@ map_free(mapblock_T **mpp)
vim_free(mp->m_orig_str);
*mpp = mp->m_next;
vim_free(mp);
+#ifdef FEAT_EVAL
+ reset_last_used_map();
+#endif
}
/*
diff --git a/src/version.c b/src/version.c
index b658ec7ae5..ec1ba92d14 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 */
/**/
+ 4111,
+/**/
4110,
/**/
4109,