Mercurial > vim
comparison src/map.c @ 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 | 1a56c0252772 |
children | 165a799b4129 |
comparison
equal
deleted
inserted
replaced
27164:5008d16b633b | 27165:0bb71ef751bb |
---|---|
83 vim_free(mp->m_keys); | 83 vim_free(mp->m_keys); |
84 vim_free(mp->m_str); | 84 vim_free(mp->m_str); |
85 vim_free(mp->m_orig_str); | 85 vim_free(mp->m_orig_str); |
86 *mpp = mp->m_next; | 86 *mpp = mp->m_next; |
87 vim_free(mp); | 87 vim_free(mp); |
88 #ifdef FEAT_EVAL | |
89 reset_last_used_map(); | |
90 #endif | |
88 } | 91 } |
89 | 92 |
90 /* | 93 /* |
91 * Return characters to represent the map mode in an allocated string. | 94 * Return characters to represent the map mode in an allocated string. |
92 * Returns NULL when out of memory. | 95 * Returns NULL when out of memory. |