mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
updated for version 7.4.569
Problem: Having CTRL-C interrupt or not does not check the mode of the mapping. (Ingo Karkat) Solution: Use a bitmask with the map mode. (Christian Brabandt)
This commit is contained in:
@@ -3708,8 +3708,13 @@ do_map(maptype, arg, mode, abbrev)
|
||||
if (!did_it)
|
||||
retval = 2; /* no match */
|
||||
else if (*keys == Ctrl_C)
|
||||
{
|
||||
/* If CTRL-C has been unmapped, reuse it for Interrupting. */
|
||||
mapped_ctrl_c = FALSE;
|
||||
if (map_table == curbuf->b_maphash)
|
||||
curbuf->b_mapped_ctrl_c &= ~mode;
|
||||
else
|
||||
mapped_ctrl_c &= ~mode;
|
||||
}
|
||||
goto theend;
|
||||
}
|
||||
|
||||
@@ -3744,7 +3749,12 @@ do_map(maptype, arg, mode, abbrev)
|
||||
|
||||
/* If CTRL-C has been mapped, don't always use it for Interrupting. */
|
||||
if (*keys == Ctrl_C)
|
||||
mapped_ctrl_c = TRUE;
|
||||
{
|
||||
if (map_table == curbuf->b_maphash)
|
||||
curbuf->b_mapped_ctrl_c |= mode;
|
||||
else
|
||||
mapped_ctrl_c |= mode;
|
||||
}
|
||||
|
||||
mp->m_keys = vim_strsave(keys);
|
||||
mp->m_str = vim_strsave(rhs);
|
||||
|
Reference in New Issue
Block a user