Skip to content

Commit d327b0c

Browse files
committed
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.
1 parent f8c53d3 commit d327b0c

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

src/ui.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2653,6 +2653,21 @@ jump_to_mouse(
26532653
return IN_STATUS_LINE;
26542654
if (on_sep_line)
26552655
return IN_SEP_LINE;
2656+
#ifdef FEAT_MENU
2657+
if (in_winbar)
2658+
{
2659+
/* A quick second click may arrive as a double-click, but we use it
2660+
* as a second click in the WinBar. */
2661+
if ((mod_mask & MOD_MASK_MULTI_CLICK) && !(flags & MOUSE_RELEASED))
2662+
{
2663+
wp = mouse_find_win(&row, &col);
2664+
if (wp == NULL)
2665+
return IN_UNKNOWN;
2666+
winbar_click(wp, col);
2667+
}
2668+
return IN_OTHER_WIN | MOUSE_WINBAR;
2669+
}
2670+
#endif
26562671
if (flags & MOUSE_MAY_STOP_VIS)
26572672
{
26582673
end_visual_mode();

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,8 @@ static char *(features[]) =
761761

762762
static int included_patches[] =
763763
{ /* Add new patch number below this line */
764+
/**/
765+
1292,
764766
/**/
765767
1291,
766768
/**/

0 commit comments

Comments
 (0)