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:
10
src/mouse.c
10
src/mouse.c
@@ -477,7 +477,7 @@ do_mouse(
|
|||||||
if ((mod_mask & MOD_MASK_MULTI_CLICK) == MOD_MASK_2CLICK)
|
if ((mod_mask & MOD_MASK_MULTI_CLICK) == MOD_MASK_2CLICK)
|
||||||
{
|
{
|
||||||
// double click opens new page
|
// double click opens new page
|
||||||
end_visual_mode();
|
end_visual_mode_keep_button();
|
||||||
tabpage_new();
|
tabpage_new();
|
||||||
tabpage_move(c1 == 0 ? 9999 : c1 - 1);
|
tabpage_move(c1 == 0 ? 9999 : c1 - 1);
|
||||||
}
|
}
|
||||||
@@ -489,7 +489,7 @@ do_mouse(
|
|||||||
|
|
||||||
// It's like clicking on the status line of a window.
|
// It's like clicking on the status line of a window.
|
||||||
if (curwin != old_curwin)
|
if (curwin != old_curwin)
|
||||||
end_visual_mode();
|
end_visual_mode_keep_button();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1568,7 +1568,7 @@ retnomove:
|
|||||||
#endif
|
#endif
|
||||||
if (flags & MOUSE_MAY_STOP_VIS)
|
if (flags & MOUSE_MAY_STOP_VIS)
|
||||||
{
|
{
|
||||||
end_visual_mode();
|
end_visual_mode_keep_button();
|
||||||
redraw_curbuf_later(INVERTED); // delete the inversion
|
redraw_curbuf_later(INVERTED); // delete the inversion
|
||||||
}
|
}
|
||||||
#if defined(FEAT_CMDWIN) && defined(FEAT_CLIPBOARD)
|
#if defined(FEAT_CMDWIN) && defined(FEAT_CLIPBOARD)
|
||||||
@@ -1717,7 +1717,7 @@ retnomove:
|
|||||||
#endif
|
#endif
|
||||||
&& (flags & MOUSE_MAY_STOP_VIS))))
|
&& (flags & MOUSE_MAY_STOP_VIS))))
|
||||||
{
|
{
|
||||||
end_visual_mode();
|
end_visual_mode_keep_button();
|
||||||
redraw_curbuf_later(INVERTED); // delete the inversion
|
redraw_curbuf_later(INVERTED); // delete the inversion
|
||||||
}
|
}
|
||||||
#ifdef FEAT_CMDWIN
|
#ifdef FEAT_CMDWIN
|
||||||
@@ -1821,7 +1821,7 @@ retnomove:
|
|||||||
// before moving the cursor for a left click, stop Visual mode
|
// before moving the cursor for a left click, stop Visual mode
|
||||||
if (flags & MOUSE_MAY_STOP_VIS)
|
if (flags & MOUSE_MAY_STOP_VIS)
|
||||||
{
|
{
|
||||||
end_visual_mode();
|
end_visual_mode_keep_button();
|
||||||
redraw_curbuf_later(INVERTED); // delete the inversion
|
redraw_curbuf_later(INVERTED); // delete the inversion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
14
src/normal.c
14
src/normal.c
@@ -1350,11 +1350,18 @@ call_yank_do_autocmd(int regname)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* End Visual mode.
|
* End Visual mode.
|
||||||
* This function should ALWAYS be called to end Visual mode, except from
|
* This function or the next should ALWAYS be called to end Visual mode, except
|
||||||
* do_pending_operator().
|
* from do_pending_operator().
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
end_visual_mode(void)
|
end_visual_mode()
|
||||||
|
{
|
||||||
|
end_visual_mode_keep_button();
|
||||||
|
reset_held_button();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
end_visual_mode_keep_button()
|
||||||
{
|
{
|
||||||
#ifdef FEAT_CLIPBOARD
|
#ifdef FEAT_CLIPBOARD
|
||||||
/*
|
/*
|
||||||
@@ -1380,7 +1387,6 @@ end_visual_mode(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
VIsual_active = FALSE;
|
VIsual_active = FALSE;
|
||||||
reset_held_button();
|
|
||||||
setmouse();
|
setmouse();
|
||||||
mouse_dragging = 0;
|
mouse_dragging = 0;
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@ void init_normal_cmds(void);
|
|||||||
void normal_cmd(oparg_T *oap, int toplevel);
|
void normal_cmd(oparg_T *oap, int toplevel);
|
||||||
void check_visual_highlight(void);
|
void check_visual_highlight(void);
|
||||||
void end_visual_mode(void);
|
void end_visual_mode(void);
|
||||||
|
void end_visual_mode_keep_button(void);
|
||||||
void reset_VIsual_and_resel(void);
|
void reset_VIsual_and_resel(void);
|
||||||
void reset_VIsual(void);
|
void reset_VIsual(void);
|
||||||
void restore_visual_mode(void);
|
void restore_visual_mode(void);
|
||||||
|
@@ -750,6 +750,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 */
|
||||||
|
/**/
|
||||||
|
2932,
|
||||||
/**/
|
/**/
|
||||||
2931,
|
2931,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user