diff options
author | Thomas Adam <thomas@xteddy.org> | 2020-03-20 18:01:25 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2020-03-20 18:01:25 +0000 |
commit | 9894e50c4296e9d34b208679f229bda636b70ff5 (patch) | |
tree | 022523076b0f299f4bf9272233c470b9e6fb5859 /menu.c | |
parent | 5b71943f8993e3778d5337a1185efd08f09633ee (diff) | |
parent | 7bbca4939537bcb12d9488cbd0e88fb8bbb5dbc3 (diff) | |
download | rtmux-9894e50c4296e9d34b208679f229bda636b70ff5.tar.gz rtmux-9894e50c4296e9d34b208679f229bda636b70ff5.tar.bz2 rtmux-9894e50c4296e9d34b208679f229bda636b70ff5.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -295,6 +295,10 @@ menu_display(struct menu *menu, int flags, struct cmdq_item *item, u_int px, if (c->tty.sx < menu->width + 4 || c->tty.sy < menu->count + 2) return (-1); + if (px + menu->width + 4 > c->tty.sx) + px = c->tty.sx - menu->width - 4; + if (py + menu->count + 2 > c->tty.sy) + py = c->tty.sy - menu->count - 2; md = xcalloc(1, sizeof *md); md->item = item; |