aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/popupmnu.c
diff options
context:
space:
mode:
authorchemzqm <chemzqm@gmail.com>2019-02-16 04:54:10 +0800
committerchemzqm <chemzqm@gmail.com>2019-03-15 04:24:41 +0800
commit6c375d71c3a92b0f83f1756799520ae61d11e64e (patch)
treef59a5c7d4f9e5ad461e603626715d05e86305724 /src/nvim/popupmnu.c
parent7e6fce0698f52fb189a78bf7388a4bdb238dcde7 (diff)
downloadrneovim-6c375d71c3a92b0f83f1756799520ae61d11e64e.tar.gz
rneovim-6c375d71c3a92b0f83f1756799520ae61d11e64e.tar.bz2
rneovim-6c375d71c3a92b0f83f1756799520ae61d11e64e.zip
autocmd: add MenuPopupChanged autocmd
Update src/nvim/auevents.lua Co-Authored-By: chemzqm <chemzqm@gmail.com>
Diffstat (limited to 'src/nvim/popupmnu.c')
-rw-r--r--src/nvim/popupmnu.c15
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);
+}