mirror of
https://github.com/neovim/neovim.git
synced 2025-09-26 21:18:34 +00:00
terminal: less babysitting of mapped_ctrl_c
process_interrupts() checks get_real_state() so we can avoid some housekeeping of mapped_ctrl_c in terminal-mode.
This commit is contained in:
@@ -2940,11 +2940,12 @@ do_map (
|
||||
if (!did_it) {
|
||||
retval = 2; /* no match */
|
||||
} else if (*keys == Ctrl_C) {
|
||||
/* If CTRL-C has been unmapped, reuse it for Interrupting. */
|
||||
if (map_table == curbuf->b_maphash)
|
||||
// If CTRL-C has been unmapped, reuse it for Interrupting.
|
||||
if (map_table == curbuf->b_maphash) {
|
||||
curbuf->b_mapped_ctrl_c &= ~mode;
|
||||
else
|
||||
} else {
|
||||
mapped_ctrl_c &= ~mode;
|
||||
}
|
||||
}
|
||||
goto theend;
|
||||
}
|
||||
@@ -2971,10 +2972,11 @@ do_map (
|
||||
|
||||
// If CTRL-C has been mapped, don't always use it for Interrupting.
|
||||
if (*keys == Ctrl_C) {
|
||||
if (map_table == curbuf->b_maphash)
|
||||
if (map_table == curbuf->b_maphash) {
|
||||
curbuf->b_mapped_ctrl_c |= mode;
|
||||
else
|
||||
} else {
|
||||
mapped_ctrl_c |= mode;
|
||||
}
|
||||
}
|
||||
|
||||
mp->m_keys = vim_strsave(keys);
|
||||
|
Reference in New Issue
Block a user