0
0
mirror of https://github.com/vim/vim.git synced 2025-10-02 05:04:20 -04:00

patch 8.2.4148: deleting any mapping may cause <ScritpCmd> to fail

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)
This commit is contained in:
Bram Moolenaar
2022-01-19 22:51:48 +00:00
parent bed34f0a8a
commit f61c89d2e6
5 changed files with 23 additions and 4 deletions

View File

@@ -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
}