=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-display-menu.c,v retrieving revision 1.30 retrieving revision 1.31 diff -c -r1.30 -r1.31 *** src/usr.bin/tmux/cmd-display-menu.c 2021/08/22 13:48:29 1.30 --- src/usr.bin/tmux/cmd-display-menu.c 2021/08/23 08:17:41 1.31 *************** *** 1,4 **** ! /* $OpenBSD: cmd-display-menu.c,v 1.30 2021/08/22 13:48:29 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-display-menu.c,v 1.31 2021/08/23 08:17:41 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott *************** *** 218,224 **** else if (n < 0) n = 0; *px = n; ! log_debug("%s: -x: %s = %s = %u", __func__, xp, p, *px); free(p); /* Expand vertical position */ --- 218,224 ---- else if (n < 0) n = 0; *px = n; ! log_debug("%s: -x: %s = %s = %u (-w %u)", __func__, xp, p, *px, w); free(p); /* Expand vertical position */ *************** *** 244,250 **** else if (n < 0) n = 0; *py = n; ! log_debug("%s: -y: %s = %s = %u", __func__, yp, p, *py); free(p); return (1); --- 244,250 ---- else if (n < 0) n = 0; *py = n; ! log_debug("%s: -y: %s = %s = %u (-h %u)", __func__, yp, p, *py, h); free(p); return (1); *************** *** 359,368 **** } } ! if (w > tty->sx - 1) ! w = tty->sx - 1; ! if (h > tty->sy - 1) ! h = tty->sy - 1; if (!cmd_display_menu_get_position(tc, item, args, &px, &py, w, h)) return (CMD_RETURN_NORMAL); --- 359,368 ---- } } ! if (w > tty->sx) ! w = tty->sx; ! if (h > tty->sy) ! h = tty->sy; if (!cmd_display_menu_get_position(tc, item, args, &px, &py, w, h)) return (CMD_RETURN_NORMAL);