1
0
forked from aniani/vim

patch 8.1.1138: plugins don't get notified when the popup menu changes

Problem:    Plugins don't get notified when the popup menu changes.
Solution:   Add the CompleteChanged event. (Andy Massimino. closes #4176)
This commit is contained in:
Bram Moolenaar
2019-04-08 18:15:41 +02:00
parent 62e1bb4a11
commit d7f246c68c
11 changed files with 165 additions and 18 deletions

View File

@@ -112,6 +112,7 @@ static struct event_name
{"CmdUndefined", EVENT_CMDUNDEFINED},
{"ColorScheme", EVENT_COLORSCHEME},
{"ColorSchemePre", EVENT_COLORSCHEMEPRE},
{"CompleteChanged", EVENT_COMPLETECHANGED},
{"CompleteDone", EVENT_COMPLETEDONE},
{"CursorHold", EVENT_CURSORHOLD},
{"CursorHoldI", EVENT_CURSORHOLDI},
@@ -1794,6 +1795,17 @@ has_textyankpost(void)
}
#endif
#if defined(FEAT_EVAL) || defined(PROTO)
/*
* Return TRUE when there is a CompleteChanged autocommand defined.
*/
int
has_completechanged(void)
{
return (first_autopat[(int)EVENT_COMPLETECHANGED] != NULL);
}
#endif
/*
* Execute autocommands for "event" and file name "fname".
* Return TRUE if some commands were executed.