0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.2930: when a popup is visible a mouse move my restart Visual mode

Problem:    When a popup is visible a mouse move my restart Visual mode.
Solution:   Reset held_button when ending Visual mode. (closes #8318)
This commit is contained in:
Bram Moolenaar
2021-06-03 20:34:57 +02:00
parent 0a808598e4
commit 85eee5b969
4 changed files with 12 additions and 1 deletions

View File

@@ -2098,6 +2098,14 @@ nv_mouse(cmdarg_T *cap)
(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,7 +2131,6 @@ check_termcode_mouse(
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