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

pull/2802/head
nicm 2021-07-21 08:09:43 +00:00
parent f0e02387b2
commit 78ec057916
1 changed files with 1 additions and 1 deletions

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);