=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-display-menu.c,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** src/usr.bin/tmux/cmd-display-menu.c 2020/03/28 09:51:12 1.9 --- src/usr.bin/tmux/cmd-display-menu.c 2020/03/28 09:55:30 1.10 *************** *** 1,4 **** ! /* $OpenBSD: cmd-display-menu.c,v 1.9 2020/03/28 09:51:12 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-display-menu.c,v 1.10 2020/03/28 09:55:30 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott *************** *** 73,84 **** u_int ox, oy, sx, sy; xp = args_get(args, 'x'); ! if (xp == NULL) ! *px = 0; else if (strcmp(xp, "R") == 0) *px = c->tty.sx - 1; - else if (strcmp(xp, "C") == 0) - *px = (c->tty.sx - 1) / 2 - w / 2; else if (strcmp(xp, "P") == 0) { tty_window_offset(&c->tty, &ox, &oy, &sx, &sy); if (wp->xoff >= ox) --- 73,82 ---- u_int ox, oy, sx, sy; xp = args_get(args, 'x'); ! if (xp == NULL || strcmp(xp, "C") == 0) ! *px = (c->tty.sx - 1) / 2 - w / 2; else if (strcmp(xp, "R") == 0) *px = c->tty.sx - 1; else if (strcmp(xp, "P") == 0) { tty_window_offset(&c->tty, &ox, &oy, &sx, &sy); if (wp->xoff >= ox) *************** *** 111,119 **** *px = c->tty.sx - w; yp = args_get(args, 'y'); ! if (yp == NULL) ! *py = 0; ! else if (strcmp(yp, "C") == 0) *py = (c->tty.sy - 1) / 2 + h / 2; else if (strcmp(yp, "P") == 0) { tty_window_offset(&c->tty, &ox, &oy, &sx, &sy); --- 109,115 ---- *px = c->tty.sx - w; yp = args_get(args, 'y'); ! if (yp == NULL || strcmp(yp, "C") == 0) *py = (c->tty.sy - 1) / 2 + h / 2; else if (strcmp(yp, "P") == 0) { tty_window_offset(&c->tty, &ox, &oy, &sx, &sy);