diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-08-24 19:36:00 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-08-24 19:36:00 +0200 |
commit | f63962378dc32c7253e4825b4b0f414a81c1dd3e (patch) | |
tree | 46ec1a7ae20b1e6d2b5e3ecf3a4c241b9791639c /src/ui.c | |
parent | 4645104be4c521dfdd43621c19e96bda3cac7be2 (diff) | |
download | vim-git-f63962378dc32c7253e4825b4b0f414a81c1dd3e.tar.gz |
patch 8.1.1920: cannot always close a popup when filter consumes all eventsv8.1.1920
Problem: Cannot close a popup by the X when a filter consumes all events.
Solution: Check for a click on the close button before invoking filters.
(closes #4858)
Diffstat (limited to 'src/ui.c')
-rw-r--r-- | src/ui.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -3070,7 +3070,8 @@ retnomove: if (row < 0 || col < 0) // check if it makes sense return IN_UNKNOWN; - // find the window where the row is in + // find the window where the row is in and adjust "row" and "col" to be + // relative to top-left of the window wp = mouse_find_win(&row, &col, FIND_POPUP); if (wp == NULL) return IN_UNKNOWN; @@ -3083,11 +3084,8 @@ retnomove: { on_sep_line = 0; in_popup_win = TRUE; - if (wp->w_popup_close == POPCLOSE_BUTTON - && which_button == MOUSE_LEFT - && popup_on_X_button(wp, row, col)) + if (which_button == MOUSE_LEFT && popup_close_if_on_X(wp, row, col)) { - popup_close_for_mouse_click(wp); return IN_UNKNOWN; } else if ((wp->w_popup_flags & (POPF_DRAG | POPF_RESIZE)) |