mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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.
This commit is contained in:
@@ -1386,7 +1386,15 @@ test_gui_mouse_event(dict_T *args)
|
||||
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");
|
||||
|
Reference in New Issue
Block a user