]> granicus.if.org Git - vim/commitdiff
patch 8.0.1292: quick clicks in the WinBar start Visual mode v8.0.1292
authorBram Moolenaar <Bram@vim.org>
Sun, 12 Nov 2017 15:56:12 +0000 (16:56 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 12 Nov 2017 15:56:12 +0000 (16:56 +0100)
Problem:    Quick clicks in the WinBar start Visual mode.
Solution:   Use a double click in the WinBar like a normal click.

src/ui.c
src/version.c

index d7daf9413da7b5d661754c959b5e5a3bd4d0d8d9..d370ad49c6ba71a521eb751ded314fa5bd0ce525 100644 (file)
--- a/src/ui.c
+++ b/src/ui.c
@@ -2653,6 +2653,21 @@ retnomove:
            return IN_STATUS_LINE;
        if (on_sep_line)
            return IN_SEP_LINE;
+#ifdef FEAT_MENU
+       if (in_winbar)
+       {
+           /* A quick second click may arrive as a double-click, but we use it
+            * as a second click in the WinBar. */
+           if ((mod_mask & MOD_MASK_MULTI_CLICK) && !(flags & MOUSE_RELEASED))
+           {
+               wp = mouse_find_win(&row, &col);
+               if (wp == NULL)
+                   return IN_UNKNOWN;
+               winbar_click(wp, col);
+           }
+           return IN_OTHER_WIN | MOUSE_WINBAR;
+       }
+#endif
        if (flags & MOUSE_MAY_STOP_VIS)
        {
            end_visual_mode();
index 912808b0503578ccdbbce69350872b95db511acd..f63b18685c95a1f6c11953674146f8fd0092c36c 100644 (file)
@@ -761,6 +761,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1292,
 /**/
     1291,
 /**/