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)
diff --git a/src/getchar.c b/src/getchar.c
index 174cfa8..3ae5f40 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -3708,8 +3708,13 @@
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 @@
/* 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);