-/* $OpenBSD: cmd-display-menu.c,v 1.24 2021/06/10 07:22:06 nicm Exp $ */
+/* $OpenBSD: cmd-display-menu.c,v 1.25 2021/07/08 11:14:53 nicm Exp $ */
/*
* Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com>
format_add(ft, "popup_mouse_centre_y", "%ld", n);
n = (long)event->m.y + h;
if (n + h >= tty->sy)
- format_add(ft, "popup_mouse_top", "%u", tty->sy - h);
+ format_add(ft, "popup_mouse_top", "%u", tty->sy - 1);
else
format_add(ft, "popup_mouse_top", "%ld", n);
n = event->m.y - h;
-/* $OpenBSD: format.c,v 1.286 2021/06/10 07:58:08 nicm Exp $ */
+/* $OpenBSD: format.c,v 1.287 2021/07/08 11:14:53 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
grid_get_cell(gd, x, y, &gc);
if (gc.flags & GRID_FLAG_PADDING)
break;
- if (utf8_cstrhas(ws, &gc.data)) {
+ if (utf8_cstrhas(ws, &gc.data) ||
+ (gc.data.size == 1 && *gc.data.data == ' ')) {
found = 1;
break;
}
grid_get_cell(gd, x, y, &gc);
if (gc.flags & GRID_FLAG_PADDING)
break;
- if (utf8_cstrhas(ws, &gc.data))
+ if (utf8_cstrhas(ws, &gc.data) ||
+ (gc.data.size == 1 && *gc.data.data == ' '))
break;
ud = xreallocarray(ud, size + 2, sizeof *ud);