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/ui.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/ui.c')
-rw-r--r-- | src/nvim/ui.c | 13 |
1 files changed, 13 insertions, 0 deletions
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(); |