0
0
mirror of https://github.com/vim/vim.git synced 2025-09-01 21:03:39 -04:00

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.
This commit is contained in:
Bram Moolenaar 2017-11-12 16:56:12 +01:00
parent f8c53d3d26
commit d327b0c68f
2 changed files with 17 additions and 0 deletions

View File

@ -2653,6 +2653,21 @@ retnomove:
return IN_STATUS_LINE; return IN_STATUS_LINE;
if (on_sep_line) if (on_sep_line)
return IN_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) if (flags & MOUSE_MAY_STOP_VIS)
{ {
end_visual_mode(); end_visual_mode();

View File

@ -761,6 +761,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1292,
/**/ /**/
1291, 1291,
/**/ /**/