0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2932: select mode test fails

Problem:    Select mode test fails.
Solution:   Do not always reset the held mouse button.
This commit is contained in:
Bram Moolenaar
2021-06-03 22:11:08 +02:00
parent 5072b47a22
commit 4f3c57f798
4 changed files with 18 additions and 9 deletions

View File

@@ -477,7 +477,7 @@ do_mouse(
if ((mod_mask & MOD_MASK_MULTI_CLICK) == MOD_MASK_2CLICK)
{
// double click opens new page
end_visual_mode();
end_visual_mode_keep_button();
tabpage_new();
tabpage_move(c1 == 0 ? 9999 : c1 - 1);
}
@@ -489,7 +489,7 @@ do_mouse(
// It's like clicking on the status line of a window.
if (curwin != old_curwin)
end_visual_mode();
end_visual_mode_keep_button();
}
}
else
@@ -1568,7 +1568,7 @@ retnomove:
#endif
if (flags & MOUSE_MAY_STOP_VIS)
{
end_visual_mode();
end_visual_mode_keep_button();
redraw_curbuf_later(INVERTED); // delete the inversion
}
#if defined(FEAT_CMDWIN) && defined(FEAT_CLIPBOARD)
@@ -1717,7 +1717,7 @@ retnomove:
#endif
&& (flags & MOUSE_MAY_STOP_VIS))))
{
end_visual_mode();
end_visual_mode_keep_button();
redraw_curbuf_later(INVERTED); // delete the inversion
}
#ifdef FEAT_CMDWIN
@@ -1821,7 +1821,7 @@ retnomove:
// before moving the cursor for a left click, stop Visual mode
if (flags & MOUSE_MAY_STOP_VIS)
{
end_visual_mode();
end_visual_mode_keep_button();
redraw_curbuf_later(INVERTED); // delete the inversion
}