mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.1.1770: cannot get the window ID of the popup preview window
Problem: Cannot get the window ID of the popup preview window. Solution: Add popup_getpreview().
This commit is contained in:
@@ -3019,7 +3019,15 @@ popup_find_preview_window(void)
|
||||
for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
|
||||
if (wp->w_p_pvw)
|
||||
return wp;
|
||||
return wp;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
f_popup_getpreview(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
{
|
||||
win_T *wp = popup_find_preview_window();
|
||||
|
||||
rettv->vval.v_number = wp == NULL ? 0 : wp->w_id;
|
||||
}
|
||||
|
||||
int
|
||||
|
Reference in New Issue
Block a user