forked from aniani/vim
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:
@@ -3836,8 +3836,9 @@ do_cmdkey_command(int key UNUSED, int flags)
|
||||
|
||||
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||
void
|
||||
reset_last_used_map(void)
|
||||
reset_last_used_map(mapblock_T *mp)
|
||||
{
|
||||
last_used_map = NULL;
|
||||
if (last_used_map == mp)
|
||||
last_used_map = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user