summaryrefslogtreecommitdiffstats
path: root/src/screen.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-06-12 20:22:27 +0200
committerBram Moolenaar <Bram@vim.org>2019-06-12 20:22:27 +0200
commit451d4b5b7c7262631cd1f5057c75d6f5f5772fb1 (patch)
treedeb24fe64258461378994e9255c68f6179f11e31 /src/screen.c
parent06e2c81f6d213d197aa60019b33a263cd5176d68 (diff)
patch 8.1.1520: popup windows are ignored when dealing with mouse positionv8.1.1520
Problem: Popup windows are ignored when dealing with mouse position Solution: Find the mouse position inside a popup window. Allow for modeless selection.
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/screen.c b/src/screen.c
index 644829ead2..7248ca221c 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -1072,8 +1072,6 @@ may_update_popup_mask(int type)
popup_reset_handled();
while ((wp = find_next_popup(TRUE)) != NULL)
{
- int height_extra, width_extra;
-
popup_visible = TRUE;
// Recompute the position if the text changed.
@@ -1081,18 +1079,11 @@ may_update_popup_mask(int type)
|| wp->w_popup_last_changedtick != CHANGEDTICK(wp->w_buffer))
popup_adjust_position(wp);
- // the width and height are for the inside, add the padding and
- // border
- height_extra = wp->w_popup_padding[0] + wp->w_popup_border[0]
- + wp->w_popup_padding[2] + wp->w_popup_border[2];
- width_extra = wp->w_popup_padding[3] + wp->w_popup_border[3]
- + wp->w_popup_padding[1] + wp->w_popup_border[1];
-
for (line = wp->w_winrow;
- line < wp->w_winrow + wp->w_height + height_extra
+ line < wp->w_winrow + popup_height(wp)
&& line < screen_Rows; ++line)
for (col = wp->w_wincol;
- col < wp->w_wincol + wp->w_width + width_extra
+ col < wp->w_wincol + popup_width(wp)
&& col < screen_Columns; ++col)
mask[line * screen_Columns + col] = wp->w_zindex;
}
@@ -1123,7 +1114,7 @@ may_update_popup_mask(int type)
int col_cp = col;
// find the window where the row is in
- wp = mouse_find_win(&line_cp, &col_cp);
+ wp = mouse_find_win(&line_cp, &col_cp, IGNORE_POPUP);
if (wp != NULL)
{
if (line_cp >= wp->w_height)