From 51915b9b0ac0ac9a98e12c1a5781f34f492a4679 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 8 Jul 2021 11:14:53 +0000 Subject: Fix mouse_word format now word-separators has no space and position of menu if too close to the bottom. --- format.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'format.c') diff --git a/format.c b/format.c index a10af458..28962701 100644 --- a/format.c +++ b/format.c @@ -4809,7 +4809,8 @@ format_grid_word(struct grid *gd, u_int x, u_int y) 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; } @@ -4846,7 +4847,8 @@ format_grid_word(struct grid *gd, u_int x, u_int y) 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); -- cgit