mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 8.2.2963: GUI: mouse move may start Visual mode with a popup visible
Problem: GUI: mouse move may start Visual mode with a popup visible. Solution: Add special code for mouse move. (closes #8318)
This commit is contained in:
@@ -3071,6 +3071,9 @@ gui_send_mouse_event(
|
||||
*/
|
||||
switch (button)
|
||||
{
|
||||
case MOUSE_MOVE:
|
||||
button_char = KE_MOUSEMOVE_XY;
|
||||
goto button_set;
|
||||
case MOUSE_X1:
|
||||
button_char = KE_X1MOUSE;
|
||||
goto button_set;
|
||||
@@ -4925,7 +4928,7 @@ gui_mouse_moved(int x, int y)
|
||||
if (popup_visible)
|
||||
// Generate a mouse-moved event, so that the popup can perhaps be
|
||||
// closed, just like in the terminal.
|
||||
gui_send_mouse_event(MOUSE_DRAG, x, y, FALSE, 0);
|
||||
gui_send_mouse_event(MOUSE_MOVE, x, y, FALSE, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user