patch 8.1.1520: popup windows are ignored when dealing with mouse position
Problem: Popup windows are ignored when dealing with mouse position
Solution: Find the mouse position inside a popup window. Allow for modeless
selection.
diff --git a/src/popupwin.c b/src/popupwin.c
index 3781c6f..adfa462 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -424,6 +424,28 @@
}
/*
+ * Return the height of popup window "wp", including border and padding.
+ */
+ int
+popup_height(win_T *wp)
+{
+ return wp->w_height
+ + wp->w_popup_padding[0] + wp->w_popup_border[0]
+ + wp->w_popup_padding[2] + wp->w_popup_border[2];
+}
+
+/*
+ * Return the width of popup window "wp", including border and padding.
+ */
+ int
+popup_width(win_T *wp)
+{
+ return wp->w_width
+ + wp->w_popup_padding[3] + wp->w_popup_border[3]
+ + wp->w_popup_padding[1] + wp->w_popup_border[1];
+}
+
+/*
* Adjust the position and size of the popup to fit on the screen.
*/
void