diff options
author | erw7 <erw7.github@gmail.com> | 2019-07-12 12:47:20 +0900 |
---|---|---|
committer | erw7 <erw7.github@gmail.com> | 2019-09-08 12:25:49 +0900 |
commit | 55b1126a22394a3c6c212cc323d53de405cca98d (patch) | |
tree | b11ed6bb29cf229ce7f75a5e4cefc6c1615e6e03 /src/nvim/popupmnu.c | |
parent | 3dbd94dafa25b6bd5a425b3a5b0c57ee196bde27 (diff) | |
download | rneovim-55b1126a22394a3c6c212cc323d53de405cca98d.tar.gz rneovim-55b1126a22394a3c6c212cc323d53de405cca98d.tar.bz2 rneovim-55b1126a22394a3c6c212cc323d53de405cca98d.zip |
Add nvim_ui_pum_set_height to api
Diffstat (limited to 'src/nvim/popupmnu.c')
-rw-r--r-- | src/nvim/popupmnu.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/nvim/popupmnu.c b/src/nvim/popupmnu.c index ce40bc15e0..8e554cbc1d 100644 --- a/src/nvim/popupmnu.c +++ b/src/nvim/popupmnu.c @@ -135,8 +135,8 @@ void pum_display(pumitem_T *array, int size, int selected, bool array_changed, ui_call_popupmenu_show(arr, selected, row, col, pum_anchor_grid); } else { ui_call_popupmenu_select(selected); + return; } - return; } def_width = PUM_DEF_WIDTH; @@ -237,6 +237,9 @@ void pum_display(pumitem_T *array, int size, int selected, bool array_changed, pum_height = row - above_row; } } + if (pum_external) { + return; + } // Compute the width of the widest match and the widest extra. for (i = 0; i < size; i++) { @@ -852,6 +855,12 @@ void pum_recompose(void) /// Only valid when pum_visible() returns TRUE! int pum_get_height(void) { + if (pum_external) { + int ui_pum_height = ui_pum_get_height(); + if (ui_pum_height) { + return ui_pum_height; + } + } return pum_height; } |