changeset 27165:0bb71ef751bb v8.2.4111

patch 8.2.4111: potential proglem when map is deleted while executing Commit: https://github.com/vim/vim/commit/d648c01f2f3798a5c75422aa83211928ad783128 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 16 14:58:34 2022 +0000 patch 8.2.4111: potential proglem when map is deleted while executing Problem: Potential proglem when map is deleted while executing. Solution: Reset last used map pointer when deleting a mapping.
author Bram Moolenaar <Bram@vim.org>
date Sun, 16 Jan 2022 16:00:08 +0100
parents 5008d16b633b
children f6c3d0df9273
files src/map.c src/version.c
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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
 }
 
 /*
--- 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,