1
0
forked from aniani/vim

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:
Bram Moolenaar
2021-06-08 20:13:31 +02:00
parent dc73b4b75d
commit 445f11d5bc
5 changed files with 15 additions and 3 deletions

View File

@@ -5588,6 +5588,7 @@ check_termcode(
&& key_name[0] == (int)KS_EXTRA
&& (key_name[1] == (int)KE_X1MOUSE
|| key_name[1] == (int)KE_X2MOUSE
|| key_name[1] == (int)KE_MOUSEMOVE_XY
|| key_name[1] == (int)KE_MOUSELEFT
|| key_name[1] == (int)KE_MOUSERIGHT
|| key_name[1] == (int)KE_MOUSEDOWN
@@ -5601,6 +5602,9 @@ check_termcode(
mouse_col = 128 * (bytes[0] - ' ' - 1) + bytes[1] - ' ' - 1;
mouse_row = 128 * (bytes[2] - ' ' - 1) + bytes[3] - ' ' - 1;
slen += num_bytes;
// equal to K_MOUSEMOVE
if (key_name[1] == (int)KE_MOUSEMOVE_XY)
key_name[1] = (int)KE_MOUSEMOVE;
}
else
#endif