1
0
mirror of https://github.com/tmux/tmux.git synced 2025-03-29 10:18:49 +00:00

Do not add height twice when calculating popup_mouse_top, from M Kelly.

This commit is contained in:
nicm 2021-07-21 08:09:43 +00:00
parent f0e02387b2
commit 78ec057916

View File

@ -175,7 +175,7 @@ cmd_display_menu_get_position(struct client *tc, struct cmdq_item *item,
} else
format_add(ft, "popup_mouse_centre_y", "%ld", n);
n = (long)event->m.y + h;
if (n + h >= tty->sy)
if (n >= tty->sy)
format_add(ft, "popup_mouse_top", "%u", tty->sy - 1);
else
format_add(ft, "popup_mouse_top", "%ld", n);