mirror of
https://github.com/tmux/tmux.git
synced 2025-12-17 00:02:23 -05:00
Fix check for vertical centre.
This commit is contained in:
parent
76cfb5f471
commit
fd5c3e6122
@ -155,7 +155,7 @@ cmd_display_menu_get_position(struct client *tc, struct cmdq_item *item,
|
|||||||
else
|
else
|
||||||
format_add(ft, "popup_centre_x", "%ld", n);
|
format_add(ft, "popup_centre_x", "%ld", n);
|
||||||
n = (tty->sy - 1) / 2 + h / 2;
|
n = (tty->sy - 1) / 2 + h / 2;
|
||||||
if (n + h >= tty->sy)
|
if (n >= tty->sy)
|
||||||
format_add(ft, "popup_centre_y", "%u", tty->sy - h);
|
format_add(ft, "popup_centre_y", "%u", tty->sy - h);
|
||||||
else
|
else
|
||||||
format_add(ft, "popup_centre_y", "%ld", n);
|
format_add(ft, "popup_centre_y", "%ld", n);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user