diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-03-16 10:36:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-16 10:36:54 +0100 |
commit | 175398f21645552b708a7626309b826ae0f3d8a8 (patch) | |
tree | 7e7597cd82108f4148d7dc2ef3b3365e78a39e01 /src/nvim/popupmnu.c | |
parent | b90256e6cc2ab22c552660c70462c08ba5fd984b (diff) | |
parent | 6c375d71c3a92b0f83f1756799520ae61d11e64e (diff) | |
download | rneovim-175398f21645552b708a7626309b826ae0f3d8a8.tar.gz rneovim-175398f21645552b708a7626309b826ae0f3d8a8.tar.bz2 rneovim-175398f21645552b708a7626309b826ae0f3d8a8.zip |
Merge pull request #9616 from chemzqm/completechange
add MenuPopupChanged autocmd
Diffstat (limited to 'src/nvim/popupmnu.c')
-rw-r--r-- | src/nvim/popupmnu.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/popupmnu.c b/src/nvim/popupmnu.c index 499ee11cad..e9b3f04454 100644 --- a/src/nvim/popupmnu.c +++ b/src/nvim/popupmnu.c @@ -12,6 +12,7 @@ #include "nvim/vim.h" #include "nvim/api/private/helpers.h" #include "nvim/ascii.h" +#include "nvim/eval/typval.h" #include "nvim/popupmnu.h" #include "nvim/charset.h" #include "nvim/ex_cmds.h" @@ -841,3 +842,17 @@ int pum_get_height(void) { return pum_height; } + +void pum_set_boundings(dict_T *dict) +{ + if (!pum_visible()) { + return; + } + tv_dict_add_nr(dict, S_LEN("height"), pum_height); + tv_dict_add_nr(dict, S_LEN("width"), pum_width); + tv_dict_add_nr(dict, S_LEN("row"), pum_row); + tv_dict_add_nr(dict, S_LEN("col"), pum_col); + tv_dict_add_nr(dict, S_LEN("size"), pum_size); + tv_dict_add_special(dict, S_LEN("scrollbar"), + pum_scrollbar ? kSpecialVarTrue : kSpecialVarFalse); +} |