diff options
author | James McCoy <jamessan@jamessan.com> | 2020-07-31 17:59:48 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2020-07-31 17:59:48 -0400 |
commit | 228d7d948200563292f13723cdd0f947bd0c711c (patch) | |
tree | e30ac7afb5cfc68470be42e8c5e02907fb44b99b /src/nvim/ui.c | |
parent | 3e3002b90c46fca8d8d5edebc021e56d95c5e645 (diff) | |
parent | 1153ac9036ab62ee25078248a01dc56a2311b9a6 (diff) | |
download | rneovim-228d7d948200563292f13723cdd0f947bd0c711c.tar.gz rneovim-228d7d948200563292f13723cdd0f947bd0c711c.tar.bz2 rneovim-228d7d948200563292f13723cdd0f947bd0c711c.zip |
Merge remote-tracking branch 'upstream/master' into fileinfo-garbage
Diffstat (limited to 'src/nvim/ui.c')
-rw-r--r-- | src/nvim/ui.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/nvim/ui.c b/src/nvim/ui.c index 79fa8b8223..685da77b39 100644 --- a/src/nvim/ui.c +++ b/src/nvim/ui.c @@ -226,7 +226,7 @@ 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; + int ui_pum_height = uis[i]->pum_nlines; if (ui_pum_height) { pum_height = pum_height != 0 ? MIN(pum_height, ui_pum_height) : ui_pum_height; @@ -235,6 +235,21 @@ int ui_pum_get_height(void) return pum_height; } +bool ui_pum_get_pos(double *pwidth, double *pheight, double *prow, double *pcol) +{ + for (size_t i = 1; i < ui_count; i++) { + if (!uis[i]->pum_pos) { + continue; + } + *pwidth = uis[i]->pum_width; + *pheight = uis[i]->pum_height; + *prow = uis[i]->pum_row; + *pcol = uis[i]->pum_col; + return true; + } + return false; +} + static void ui_refresh_event(void **argv) { ui_refresh(); @@ -424,7 +439,7 @@ int ui_current_col(void) void ui_flush(void) { cmdline_ui_flush(); - win_ui_flush_positions(); + win_ui_flush(); msg_ext_ui_flush(); msg_scroll_flush(); @@ -505,7 +520,7 @@ void ui_grid_resize(handle_T grid_handle, int width, int height, Error *error) } if (wp->w_floating) { - if (width != wp->w_width && height != wp->w_height) { + if (width != wp->w_width || height != wp->w_height) { wp->w_float_config.width = width; wp->w_float_config.height = height; win_config_float(wp, wp->w_float_config); |