]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.0022: click in popup window doesn't close it in the GUI v8.2.0022
authorBram Moolenaar <Bram@vim.org>
Wed, 18 Dec 2019 20:33:22 +0000 (21:33 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 18 Dec 2019 20:33:22 +0000 (21:33 +0100)
Problem:    Click in popup window doesn't close it in the GUI. (Sergey Vlasov)
Solution:   When processing the selection also send a button release event.
            (closes #5367)

src/gui.c
src/version.c

index 0a7f346dbc6d16076e6bc84b81caaa322e83ae6e..8fd311474361da5cb2c49d538e2ad5ebc6c839f3 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -3108,7 +3108,11 @@ button_set:
     if (clip_star.state == SELECT_IN_PROGRESS)
     {
        clip_process_selection(button, X_2_COL(x), Y_2_ROW(y), repeated_click);
-       return;
+
+       // A release event may still need to be sent if the position is equal.
+       row = gui_xy2colrow(x, y, &col);
+       if (button != MOUSE_RELEASE || row != prev_row || col != prev_col)
+           return;
     }
 
     // Determine which mouse settings to look for based on the current mode
index 69341e0e59d295567809e0b2aa1ea47baba60981..286770288e86098a8d602f7b4fb76236b70c9784 100644 (file)
@@ -742,6 +742,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    22,
 /**/
     21,
 /**/