diff options
Diffstat (limited to 'src/popupwin.c')
-rw-r--r-- | src/popupwin.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/popupwin.c b/src/popupwin.c index aa19a5d63..ea85588f2 100644 --- a/src/popupwin.c +++ b/src/popupwin.c @@ -1890,6 +1890,20 @@ f_popup_getpos(typval_T *argvars, typval_T *rettv) win_valid(wp) && (wp->w_popup_flags & POPF_HIDDEN) == 0); } } +/* + * popup_locate({row}, {col}) + */ + void +f_popup_locate(typval_T *argvars, typval_T *rettv) +{ + int row = tv_get_number(&argvars[0]) - 1; + int col = tv_get_number(&argvars[1]) - 1; + win_T *wp; + + wp = mouse_find_win(&row, &col, FIND_POPUP); + if (WIN_IS_POPUP(wp)) + rettv->vval.v_number = wp->w_id; +} /* * For popup_getoptions(): add a "border" or "padding" entry to "dict". |