summaryrefslogtreecommitdiffstats
path: root/cmd-display-menu.c
diff options
context:
space:
mode:
authornicm <nicm>2021-07-08 11:14:53 +0000
committernicm <nicm>2021-07-08 11:14:53 +0000
commit51915b9b0ac0ac9a98e12c1a5781f34f492a4679 (patch)
treec52ba8cfec14c7d1da0e5bbe2867dd003d2993f5 /cmd-display-menu.c
parent32f2d9d089ced7d693aa412821f1d66134877cf0 (diff)
Fix mouse_word format now word-separators has no space and position of
menu if too close to the bottom.
Diffstat (limited to 'cmd-display-menu.c')
-rw-r--r--cmd-display-menu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd-display-menu.c b/cmd-display-menu.c
index f2100bdb..a68b9fc4 100644
--- a/cmd-display-menu.c
+++ b/cmd-display-menu.c
@@ -176,7 +176,7 @@ cmd_display_menu_get_position(struct client *tc, struct cmdq_item *item,
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;