changeset 12831:5cb08ec9d4cf v8.0.1292

patch 8.0.1292: quick clicks in the WinBar start Visual mode commit https://github.com/vim/vim/commit/d327b0c68fa9b32877123f77560f4521a9eb39db Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 12 16:56:12 2017 +0100 patch 8.0.1292: quick clicks in the WinBar start Visual mode Problem: Quick clicks in the WinBar start Visual mode. Solution: Use a double click in the WinBar like a normal click.
author Christian Brabandt <cb@256bit.org>
date Sun, 12 Nov 2017 17:00:07 +0100
parents 36e0c6ef69e8
children 3b4c04beb913
files src/ui.c src/version.c
diffstat 2 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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();
--- a/src/version.c
+++ b/src/version.c
@@ -762,6 +762,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1292,
+/**/
     1291,
 /**/
     1290,