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)
diff --git a/src/popupmnu.c b/src/popupmnu.c
index 7be8a9b..ba9c7ad 100644
--- a/src/popupmnu.c
+++ b/src/popupmnu.c
@@ -923,6 +923,22 @@
return pum_height;
}
+/*
+ * Add size information about the pum to "dict".
+ */
+ void
+pum_set_event_info(dict_T *dict)
+{
+ if (!pum_visible())
+ return;
+ dict_add_number(dict, "height", pum_height);
+ dict_add_number(dict, "width", pum_width);
+ dict_add_number(dict, "row", pum_row);
+ dict_add_number(dict, "col", pum_col);
+ dict_add_number(dict, "size", pum_size);
+ dict_add_special(dict, "scrollbar", pum_scrollbar ? VVAL_TRUE : VVAL_FALSE);
+}
+
# if defined(FEAT_BEVAL_TERM) || defined(FEAT_TERM_POPUP_MENU) || defined(PROTO)
static void
pum_position_at_mouse(int min_width)