diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-06-03 20:34:57 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-06-03 20:34:57 +0200 |
commit | 85eee5b969485142b54337cadadd65a38e7d7396 (patch) | |
tree | 567e41e984bb7da60b1a3ec18123bdd83e4006d9 /src/mouse.c | |
parent | 0a808598e4edb3f1a167ac8c5c1f9084af625c4d (diff) |
patch 8.2.2930: when a popup is visible a mouse move my restart Visual modev8.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)
Diffstat (limited to 'src/mouse.c')
-rw-r--r-- | src/mouse.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mouse.c b/src/mouse.c index 4bff48e768..f1c1aabbc8 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -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 |