mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
updated for version 7.4.414
Problem: Cannot define a command only when it's used. Solution: Add the CmdUndefined autocommand event. (partly by Yasuhiro Matsumoto)
This commit is contained in:
19
src/fileio.c
19
src/fileio.c
@@ -7641,6 +7641,7 @@ static struct event_name
|
||||
{"BufWriteCmd", EVENT_BUFWRITECMD},
|
||||
{"CmdwinEnter", EVENT_CMDWINENTER},
|
||||
{"CmdwinLeave", EVENT_CMDWINLEAVE},
|
||||
{"CmdUndefined", EVENT_CMDUNDEFINED},
|
||||
{"ColorScheme", EVENT_COLORSCHEME},
|
||||
{"CompleteDone", EVENT_COMPLETEDONE},
|
||||
{"CursorHold", EVENT_CURSORHOLD},
|
||||
@@ -9159,6 +9160,24 @@ has_insertcharpre()
|
||||
return (first_autopat[(int)EVENT_INSERTCHARPRE] != NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE when there is an CmdUndefined autocommand defined.
|
||||
*/
|
||||
int
|
||||
has_cmdundefined()
|
||||
{
|
||||
return (first_autopat[(int)EVENT_CMDUNDEFINED] != NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE when there is an FuncUndefined autocommand defined.
|
||||
*/
|
||||
int
|
||||
has_funcundefined()
|
||||
{
|
||||
return (first_autopat[(int)EVENT_FUNCUNDEFINED] != NULL);
|
||||
}
|
||||
|
||||
static int
|
||||
apply_autocmds_group(event, fname, fname_io, force, group, buf, eap)
|
||||
event_T event;
|
||||
|
Reference in New Issue
Block a user