patch 8.2.4965: GUI: testing mouse move event depends on screen cell size
Problem: GUI: testing mouse move event depends on screen cell size.
Solution: Multiply the row and column with the screen cell size.
diff --git a/src/testing.c b/src/testing.c
index 572dcdc..23ab98f 100644
--- a/src/testing.c
+++ b/src/testing.c
@@ -1386,7 +1386,15 @@
col = (int)dict_get_number(args, (char_u *)"col");
if (move)
+ {
+ if (dict_get_bool(args, (char_u *)"cell", FALSE))
+ {
+ // click in the middle of the character cell
+ row = row * gui.char_height + gui.char_height / 2;
+ col = col * gui.char_width + gui.char_width / 2;
+ }
gui_mouse_moved(col, row);
+ }
else
{
button = (int)dict_get_number(args, (char_u *)"button");