comparison src/popupwin.c @ 17545:1e45331bd2ab v8.1.1770

patch 8.1.1770: cannot get the window ID of the popup preview window commit https://github.com/vim/vim/commit/56c0c4749d58e9331b212c38df46e2993d5d97c1 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 28 17:57:43 2019 +0200 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().
author Bram Moolenaar <Bram@vim.org>
date Sun, 28 Jul 2019 18:00:05 +0200
parents a5427e35d0fb
children 8cca2654d459
comparison
equal deleted inserted replaced
17544:531324882cb8 17545:1e45331bd2ab
3017 3017
3018 // Preview window popup is always local to tab page. 3018 // Preview window popup is always local to tab page.
3019 for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next) 3019 for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
3020 if (wp->w_p_pvw) 3020 if (wp->w_p_pvw)
3021 return wp; 3021 return wp;
3022 return wp; 3022 return NULL;
3023 }
3024
3025 void
3026 f_popup_getpreview(typval_T *argvars UNUSED, typval_T *rettv)
3027 {
3028 win_T *wp = popup_find_preview_window();
3029
3030 rettv->vval.v_number = wp == NULL ? 0 : wp->w_id;
3023 } 3031 }
3024 3032
3025 int 3033 int
3026 popup_is_popup(win_T *wp) 3034 popup_is_popup(win_T *wp)
3027 { 3035 {