summaryrefslogtreecommitdiffstats
path: root/src/autocmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/autocmd.c')
-rw-r--r--src/autocmd.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/autocmd.c b/src/autocmd.c
index 8380f8a..00f41bd 100644
--- a/src/autocmd.c
+++ b/src/autocmd.c
@@ -120,6 +120,7 @@ static keyvalue_T event_tab[] = {
KEYVALUE_ENTRY(EVENT_CURSORHOLD, "CursorHold"),
KEYVALUE_ENTRY(EVENT_CURSORHOLDI, "CursorHoldI"),
KEYVALUE_ENTRY(EVENT_CURSORMOVED, "CursorMoved"),
+ KEYVALUE_ENTRY(EVENT_CURSORMOVEDC, "CursorMovedC"),
KEYVALUE_ENTRY(EVENT_CURSORMOVEDI, "CursorMovedI"),
KEYVALUE_ENTRY(EVENT_DIFFUPDATED, "DiffUpdated"),
KEYVALUE_ENTRY(EVENT_DIRCHANGED, "DirChanged"),
@@ -154,6 +155,7 @@ static keyvalue_T event_tab[] = {
KEYVALUE_ENTRY(EVENT_INSERTENTER, "InsertEnter"),
KEYVALUE_ENTRY(EVENT_INSERTLEAVE, "InsertLeave"),
KEYVALUE_ENTRY(EVENT_INSERTLEAVEPRE, "InsertLeavePre"),
+ KEYVALUE_ENTRY(EVENT_KEYINPUTPRE, "KeyInputPre"),
KEYVALUE_ENTRY(EVENT_MENUPOPUP, "MenuPopup"),
KEYVALUE_ENTRY(EVENT_MODECHANGED, "ModeChanged"),
KEYVALUE_ENTRY(EVENT_OPTIONSET, "OptionSet"),
@@ -2021,6 +2023,15 @@ has_insertcharpre(void)
}
/*
+ * Return TRUE when there is an KeyInputPre autocommand defined.
+ */
+ int
+has_keyinputpre(void)
+{
+ return (first_autopat[(int)EVENT_KEYINPUTPRE] != NULL);
+}
+
+/*
* Return TRUE when there is an CmdUndefined autocommand defined.
*/
int
@@ -2250,10 +2261,12 @@ apply_autocmds_group(
|| event == EVENT_CMDLINECHANGED
|| event == EVENT_CMDLINEENTER
|| event == EVENT_CMDLINELEAVE
+ || event == EVENT_CURSORMOVEDC
|| event == EVENT_CMDWINENTER
|| event == EVENT_CMDWINLEAVE
|| event == EVENT_CMDUNDEFINED
|| event == EVENT_FUNCUNDEFINED
+ || event == EVENT_KEYINPUTPRE
|| event == EVENT_REMOTEREPLY
|| event == EVENT_SPELLFILEMISSING
|| event == EVENT_QUICKFIXCMDPRE