diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-11-26 13:06:22 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-11-26 13:06:22 +0000 |
commit | abe74a6acae5db22e7da1d3f8d5b4acfd7433599 (patch) | |
tree | 060cb3d19d4183c7c02e859a8a68440179443c23 /usr.bin/tmux | |
parent | 7946a4b77180cb900f354357e7895073ad9bcb50 (diff) |
Fix check for vertical centre.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/cmd-display-menu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-display-menu.c b/usr.bin/tmux/cmd-display-menu.c index 800e6a1d49d..dabb9273cfc 100644 --- a/usr.bin/tmux/cmd-display-menu.c +++ b/usr.bin/tmux/cmd-display-menu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-display-menu.c,v 1.21 2020/11/03 08:09:35 nicm Exp $ */ +/* $OpenBSD: cmd-display-menu.c,v 1.22 2020/11/26 13:06:21 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -155,7 +155,7 @@ cmd_display_menu_get_position(struct client *tc, struct cmdq_item *item, else format_add(ft, "popup_centre_x", "%ld", n); 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); else format_add(ft, "popup_centre_y", "%ld", n); |