From 55b1126a22394a3c6c212cc323d53de405cca98d Mon Sep 17 00:00:00 2001 From: erw7 Date: Fri, 12 Jul 2019 12:47:20 +0900 Subject: Add nvim_ui_pum_set_height to api --- src/nvim/ui.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/nvim/ui.c') diff --git a/src/nvim/ui.c b/src/nvim/ui.c index 94fae0a774..265b343f0d 100644 --- a/src/nvim/ui.c +++ b/src/nvim/ui.c @@ -221,6 +221,19 @@ void ui_refresh(void) ui_cursor_shape(); } +int ui_pum_get_height(void) +{ + int pum_height = 0; + for (size_t i = 1; i < ui_count; i++) { + int ui_pum_height = uis[i]->pum_height; + if (ui_pum_height) { + pum_height = + pum_height != 0 ? MIN(pum_height, ui_pum_height) : ui_pum_height; + } + } + return pum_height; +} + static void ui_refresh_event(void **argv) { ui_refresh(); -- cgit