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);
}
// It's like clicking on the status line of a window.
if (curwin != old_curwin)
- end_visual_mode();
+ end_visual_mode_keep_button();
}
}
else
#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)
#endif
&& (flags & MOUSE_MAY_STOP_VIS))))
{
- end_visual_mode();
+ end_visual_mode_keep_button();
redraw_curbuf_later(INVERTED); // delete the inversion
}
#ifdef FEAT_CMDWIN
// 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
}
/*
* End Visual mode.
- * This function should ALWAYS be called to end Visual mode, except from
- * do_pending_operator().
+ * This function or the next should ALWAYS be called to end Visual mode, except
+ * from do_pending_operator().
*/
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
/*
#endif
VIsual_active = FALSE;
- reset_held_button();
setmouse();
mouse_dragging = 0;
void normal_cmd(oparg_T *oap, int toplevel);
void check_visual_highlight(void);
void end_visual_mode(void);
+void end_visual_mode_keep_button(void);
void reset_VIsual_and_resel(void);
void reset_VIsual(void);
void restore_visual_mode(void);