diff options
author | Yatao Li <yatli@microsoft.com> | 2020-03-03 18:17:37 +0800 |
---|---|---|
committer | Yatao Li <yatli@microsoft.com> | 2020-04-28 01:53:05 +0800 |
commit | 6da16ac931eec7be2487ee98e7f605fa12b0171d (patch) | |
tree | 3835e1fee5c75f5f54c0cbc6f23ef5ccefe1c37a /src/nvim/popupmnu.c | |
parent | 9c85caa390ccf6295233c4201a60ccfa66417816 (diff) | |
download | rneovim-6da16ac931eec7be2487ee98e7f605fa12b0171d.tar.gz rneovim-6da16ac931eec7be2487ee98e7f605fa12b0171d.tar.bz2 rneovim-6da16ac931eec7be2487ee98e7f605fa12b0171d.zip |
external pum: use floating point geometry; typval: add tv_dict_add_float
Diffstat (limited to 'src/nvim/popupmnu.c')
-rw-r--r-- | src/nvim/popupmnu.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/popupmnu.c b/src/nvim/popupmnu.c index 5f636ba847..051cd660db 100644 --- a/src/nvim/popupmnu.c +++ b/src/nvim/popupmnu.c @@ -906,7 +906,7 @@ int pum_get_height(void) /// /// @return the internal pum geometry. Ignores UI external pum geometry. /// Only valid when pum_visible() returns TRUE! -void pum_get_internal_pos(int* pwidth, int* pheight, int* prow, int* pcol) +void pum_get_internal_pos(int *pwidth, int *pheight, int *prow, int *pcol) { *pwidth = pum_width; *pheight = pum_height; @@ -920,12 +920,12 @@ void pum_set_event_info(dict_T *dict) if (!pum_visible()) { return; } - int w,h,r,c; + double w, h, r, c; ui_pum_get_pos(&w, &h, &r, &c); - tv_dict_add_nr(dict, S_LEN("height"), h); - tv_dict_add_nr(dict, S_LEN("width"), w); - tv_dict_add_nr(dict, S_LEN("row"), r); - tv_dict_add_nr(dict, S_LEN("col"), c); + tv_dict_add_float(dict, S_LEN("height"), h); + tv_dict_add_float(dict, S_LEN("width"), w); + tv_dict_add_float(dict, S_LEN("row"), r); + tv_dict_add_float(dict, S_LEN("col"), c); tv_dict_add_nr(dict, S_LEN("size"), pum_size); tv_dict_add_special(dict, S_LEN("scrollbar"), pum_scrollbar ? kSpecialVarTrue : kSpecialVarFalse); |