summaryrefslogtreecommitdiffstats
path: root/src/autocmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-04-08 18:15:41 +0200
committerBram Moolenaar <Bram@vim.org>2019-04-08 18:15:41 +0200
commitd7f246c68cfb97406bcd4b098a2df2d870b3ef92 (patch)
tree54fb7c248c198f511947c45a8942302d8d2a041a /src/autocmd.c
parent62e1bb4a111e7ce570c30965f40a68a07a9da5b0 (diff)
patch 8.1.1138: plugins don't get notified when the popup menu changesv8.1.1138
Problem: Plugins don't get notified when the popup menu changes. Solution: Add the CompleteChanged event. (Andy Massimino. closes #4176)
Diffstat (limited to 'src/autocmd.c')
-rw-r--r--src/autocmd.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/autocmd.c b/src/autocmd.c
index aa11143337..2ea23ccc4f 100644
--- a/src/autocmd.c
+++ b/src/autocmd.c
@@ -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.