mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 09:18:19 +00:00
vim-patch:7.4.414
Problem: Cannot define a command only when it's used. Solution: Add the CmdUndefined autocommand event. (partly by Yasuhiro Matsumoto) https://code.google.com/p/vim/source/detail?r=v7-4-414
This commit is contained in:
@@ -5198,6 +5198,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},
|
||||
@@ -6462,6 +6463,18 @@ int has_insertcharpre(void)
|
||||
return first_autopat[(int)EVENT_INSERTCHARPRE] != NULL;
|
||||
}
|
||||
|
||||
/// @returns true when there is an CmdUndefined autocommand defined.
|
||||
int has_cmdundefined(void)
|
||||
{
|
||||
return first_autopat[(int)EVENT_CMDUNDEFINED] != NULL;
|
||||
}
|
||||
|
||||
/// @returns true when there is an FuncUndefined autocommand defined.
|
||||
int has_funcundefined(void)
|
||||
{
|
||||
return first_autopat[(int)EVENT_FUNCUNDEFINED] != NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
apply_autocmds_group (
|
||||
event_T event,
|
||||
|
Reference in New Issue
Block a user