mirror of
https://github.com/neovim/neovim.git
synced 2025-11-24 19:20:39 +00:00
vim-patch:8.1.0504: when CTRL-C is mapped it triggers InsertLeave (#9192)
Problem: When CTRL-C is mapped it triggers InsertLeave.
Solution: Make CTRL-C behave the same way when typed or used in a mapping.
4dbc262764
This commit is contained in:
committed by
Justin M. Keyes
parent
87d67814e5
commit
a6661178aa
@@ -468,7 +468,10 @@ static void insert_enter(InsertState *s)
|
||||
}
|
||||
|
||||
foldUpdateAfterInsert();
|
||||
if (s->cmdchar != 'r' && s->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 (s->cmdchar != 'r' && s->cmdchar != 'v' && s->c != Ctrl_C) {
|
||||
ins_apply_autocmds(EVENT_INSERTLEAVE);
|
||||
}
|
||||
did_cursorhold = false;
|
||||
|
||||
Reference in New Issue
Block a user