Patch 8.2.2930
Problem: When a popup is visible a mouse move my restart Visual mode.
Solution: Reset held_button when ending Visual mode. (closes #8318)
Files: src/mouse.c, src/proto/mouse.pro, src/normal.c
*** ../vim-8.2.2929/src/mouse.c 2021-02-17 13:14:03.688013283 +0100
--- src/mouse.c 2021-06-03 20:33:23.323065998 +0200
***************
*** 2098,2103 ****
--- 2098,2111 ----
(void)do_mouse(cap->oap, cap->cmdchar, BACKWARD, cap->count1, 0);
}
+ static int held_button = MOUSE_RELEASE;
+
+ void
+ reset_held_button()
+ {
+ held_button = MOUSE_RELEASE;
+ }
+
/*
* Check if typebuf 'tp' contains a terminal mouse code and returns the
* modifiers found in typebuf in 'modifiers'.
***************
*** 2123,2129 ****
int is_release, release_is_ambiguous;
int wheel_code = 0;
int current_button;
- static int held_button = MOUSE_RELEASE;
static int orig_num_clicks = 1;
static int orig_mouse_code = 0x0;
# ifdef CHECK_DOUBLE_CLICK
--- 2131,2136 ----
*** ../vim-8.2.2929/src/proto/mouse.pro 2019-12-12 12:55:28.000000000 +0100
--- src/proto/mouse.pro 2021-06-03 20:29:33.451625361 +0200
***************
*** 13,18 ****
--- 13,19 ----
int jump_to_mouse(int flags, int *inclusive, int which_button);
void nv_mousescroll(cmdarg_T *cap);
void nv_mouse(cmdarg_T *cap);
+ void reset_held_button(void);
int check_termcode_mouse(char_u *tp, int *slen, char_u *key_name, char_u
*modifiers_start, int idx, int *modifiers);
int mouse_comp_pos(win_T *win, int *rowp, int *colp, linenr_T *lnump, int
*plines_cache);
win_T *mouse_find_win(int *rowp, int *colp, mouse_find_T popup);
*** ../vim-8.2.2929/src/normal.c 2021-06-02 13:28:11.435120452 +0200
--- src/normal.c 2021-06-03 20:34:43.338873597 +0200
***************
*** 1380,1385 ****
--- 1380,1386 ----
#endif
VIsual_active = FALSE;
+ reset_held_button();
setmouse();
mouse_dragging = 0;
*** ../vim-8.2.2929/src/version.c 2021-06-02 19:22:41.541325153 +0200
--- src/version.c 2021-06-02 20:29:28.276189826 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2930,
/**/
--
There are only two hard things in programming: Cache invalidation,
naming things and off-by-one errors.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202106031835.153IZVT42911248%40masaka.moolenaar.net.