Mercurial > vim
comparison src/mouse.c @ 24784:288565c9b4e0 v8.2.2930
patch 8.2.2930: when a popup is visible a mouse move my restart Visual mode
Commit: https://github.com/vim/vim/commit/85eee5b969485142b54337cadadd65a38e7d7396
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 3 20:34:57 2021 +0200
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 https://github.com/vim/vim/issues/8318)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 03 Jun 2021 20:45:03 +0200 |
parents | 17697c4e5d48 |
children | b36ceac30454 |
comparison
equal
deleted
inserted
replaced
24783:d0385e7a51bf | 24784:288565c9b4e0 |
---|---|
2096 nv_mouse(cmdarg_T *cap) | 2096 nv_mouse(cmdarg_T *cap) |
2097 { | 2097 { |
2098 (void)do_mouse(cap->oap, cap->cmdchar, BACKWARD, cap->count1, 0); | 2098 (void)do_mouse(cap->oap, cap->cmdchar, BACKWARD, cap->count1, 0); |
2099 } | 2099 } |
2100 | 2100 |
2101 static int held_button = MOUSE_RELEASE; | |
2102 | |
2103 void | |
2104 reset_held_button() | |
2105 { | |
2106 held_button = MOUSE_RELEASE; | |
2107 } | |
2108 | |
2101 /* | 2109 /* |
2102 * Check if typebuf 'tp' contains a terminal mouse code and returns the | 2110 * Check if typebuf 'tp' contains a terminal mouse code and returns the |
2103 * modifiers found in typebuf in 'modifiers'. | 2111 * modifiers found in typebuf in 'modifiers'. |
2104 */ | 2112 */ |
2105 int | 2113 int |
2121 int mouse_code = 0; // init for GCC | 2129 int mouse_code = 0; // init for GCC |
2122 int is_click, is_drag; | 2130 int is_click, is_drag; |
2123 int is_release, release_is_ambiguous; | 2131 int is_release, release_is_ambiguous; |
2124 int wheel_code = 0; | 2132 int wheel_code = 0; |
2125 int current_button; | 2133 int current_button; |
2126 static int held_button = MOUSE_RELEASE; | |
2127 static int orig_num_clicks = 1; | 2134 static int orig_num_clicks = 1; |
2128 static int orig_mouse_code = 0x0; | 2135 static int orig_mouse_code = 0x0; |
2129 # ifdef CHECK_DOUBLE_CLICK | 2136 # ifdef CHECK_DOUBLE_CLICK |
2130 static int orig_mouse_col = 0; | 2137 static int orig_mouse_col = 0; |
2131 static int orig_mouse_row = 0; | 2138 static int orig_mouse_row = 0; |