From: Bram Moolenaar Date: Sun, 16 Jan 2022 14:58:34 +0000 (+0000) Subject: patch 8.2.4111: potential proglem when map is deleted while executing X-Git-Tag: v8.2.4111 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d648c01f2f3798a5c75422aa83211928ad783128;p=vim 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. --- diff --git a/src/map.c b/src/map.c index 181aa654b..6ad938d7e 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 b658ec7ae..ec1ba92d1 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 4111, /**/ 4110, /**/