mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 8.1.0504: when CTRL-C is mapped it triggers InsertLeave
Problem: When CTRL-C is mapped it triggers InsertLeave. Solution: Make CTRL-C behave the same way when typed or used in a mapping.
This commit is contained in:
@@ -1048,7 +1048,10 @@ doESCkey:
|
||||
|
||||
if (ins_esc(&count, cmdchar, nomove))
|
||||
{
|
||||
if (cmdchar != 'r' && cmdchar != 'v')
|
||||
// When CTRL-C was typed got_int will be set, with the result
|
||||
// that the autocommands won't be executed. When mapped got_int
|
||||
// is not set, but let's keep the behavior the same.
|
||||
if (cmdchar != 'r' && cmdchar != 'v' && c != Ctrl_C)
|
||||
ins_apply_autocmds(EVENT_INSERTLEAVE);
|
||||
did_cursorhold = FALSE;
|
||||
return (c == Ctrl_O);
|
||||
@@ -2408,7 +2411,7 @@ has_compl_option(int dict_opt)
|
||||
int
|
||||
vim_is_ctrl_x_key(int c)
|
||||
{
|
||||
/* Always allow ^R - let it's results then be checked */
|
||||
// Always allow ^R - let its results then be checked
|
||||
if (c == Ctrl_R)
|
||||
return TRUE;
|
||||
|
||||
|
Reference in New Issue
Block a user