Mercurial > vim
diff src/popupmnu.c @ 16268:0f65f2808470 v8.1.1138
patch 8.1.1138: plugins don't get notified when the popup menu changes
commit https://github.com/vim/vim/commit/d7f246c68cfb97406bcd4b098a2df2d870b3ef92
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Apr 8 18:15:41 2019 +0200
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 https://github.com/vim/vim/issues/4176)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 08 Apr 2019 18:30:06 +0200 |
parents | ddd82b1c9e9d |
children | a1229400434a |
line wrap: on
line diff
--- a/src/popupmnu.c +++ b/src/popupmnu.c @@ -923,6 +923,22 @@ pum_get_height(void) 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)