diff options
author | nicm <nicm> | 2021-07-08 11:14:53 +0000 |
---|---|---|
committer | nicm <nicm> | 2021-07-08 11:14:53 +0000 |
commit | 51915b9b0ac0ac9a98e12c1a5781f34f492a4679 (patch) | |
tree | c52ba8cfec14c7d1da0e5bbe2867dd003d2993f5 /format.c | |
parent | 32f2d9d089ced7d693aa412821f1d66134877cf0 (diff) | |
download | rtmux-51915b9b0ac0ac9a98e12c1a5781f34f492a4679.tar.gz rtmux-51915b9b0ac0ac9a98e12c1a5781f34f492a4679.tar.bz2 rtmux-51915b9b0ac0ac9a98e12c1a5781f34f492a4679.zip |
Fix mouse_word format now word-separators has no space and position of
menu if too close to the bottom.
Diffstat (limited to 'format.c')
-rw-r--r-- | format.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); |