summaryrefslogtreecommitdiffstats
path: root/src/gui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-06-08 20:13:31 +0200
committerBram Moolenaar <Bram@vim.org>2021-06-08 20:13:31 +0200
commit445f11d5bcfddfa194ebd12b029228c7e957f94c (patch)
treee68aafe3970bdd1e79daa1cc4c7432d21cdad23d /src/gui.c
parentdc73b4b75de0134db3dffa6e631daf6cae817545 (diff)
patch 8.2.2963: GUI: mouse move may start Visual mode with a popup visiblev8.2.2963
Problem: GUI: mouse move may start Visual mode with a popup visible. Solution: Add special code for mouse move. (closes #8318)
Diffstat (limited to 'src/gui.c')
-rw-r--r--src/gui.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui.c b/src/gui.c
index 2539a4f642..b5ec007405 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -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
}