vim-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.
d327b0c68f
This commit is contained in:
Jan Edmund Lazo
2020-03-14 11:32:34 -04:00
parent 355dffdd76
commit 05f58a2858

View File

@@ -94,10 +94,24 @@ int jump_to_mouse(int flags,
retnomove:
// before moving the cursor for a left click which is NOT in a status
// line, stop Visual mode
if (on_status_line)
if (on_status_line) {
return IN_STATUS_LINE;
if (on_sep_line)
}
if (on_sep_line) {
return IN_SEP_LINE;
}
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(&grid, &row, &col);
if (wp == NULL) {
return IN_UNKNOWN;
}
winbar_click(wp, col);
}
return IN_OTHER_WIN | MOUSE_WINBAR;
}
if (flags & MOUSE_MAY_STOP_VIS) {
end_visual_mode();
redraw_curbuf_later(INVERTED); // delete the inversion