From ddf53d6e4e76463e6d777b2de7304572333935e9 Mon Sep 17 00:00:00 2001 From: nicm Date: Sat, 6 Jul 2019 20:56:34 +0000 Subject: Correctly adjust mouse position if the status line is at the top and more than one line. GitHub issue 1822. --- cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd.c') diff --git a/cmd.c b/cmd.c index a071dec5..c838c53f 100644 --- a/cmd.c +++ b/cmd.c @@ -597,8 +597,8 @@ cmd_mouse_at(struct window_pane *wp, struct mouse_event *m, u_int *xp, } log_debug("%s: x=%u, y=%u%s", __func__, x, y, last ? " (last)" : ""); - if (m->statusat == 0 && y > 0) - y--; + if (m->statusat == 0 && y >= m->statuslines) + y -= m->statuslines; if (x < wp->xoff || x >= wp->xoff + wp->sx) return (-1); -- cgit