mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 19:06:31 +00:00
ui_pum_get_pos: return internal pum position if external pum pos not found
This commit is contained in:
@@ -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,7 +235,7 @@ int ui_pum_get_height(void)
|
||||
return pum_height;
|
||||
}
|
||||
|
||||
bool ui_pum_get_pos(int* pwidth, int *pheight, int* prow, int* pcol)
|
||||
void ui_pum_get_pos(int* pwidth, int *pheight, int* prow, int* pcol)
|
||||
{
|
||||
int w=0,h=0,r=-1,c=-1;
|
||||
bool found = false;
|
||||
@@ -254,11 +254,14 @@ bool ui_pum_get_pos(int* pwidth, int *pheight, int* prow, int* pcol)
|
||||
c = MIN(uis[i]->pum_col, c);
|
||||
}
|
||||
}
|
||||
*pwidth = w;
|
||||
*pheight = h;
|
||||
*prow = r;
|
||||
*pcol = c;
|
||||
return found;
|
||||
if (found) {
|
||||
*pwidth = w;
|
||||
*pheight = h;
|
||||
*prow = r;
|
||||
*pcol = c;
|
||||
} else {
|
||||
pum_get_internal_pos(pwidth, pheight, prow, pcol);
|
||||
}
|
||||
}
|
||||
|
||||
static void ui_refresh_event(void **argv)
|
||||
|
Reference in New Issue
Block a user