Correctly adjust mouse position if the status line is at the top and

more than one line. GitHub issue 1822.
This commit is contained in:
nicm
2019-07-06 20:56:34 +00:00
parent 3635b3cd6c
commit ddf53d6e4e
3 changed files with 10 additions and 9 deletions

4
cmd.c
View File

@ -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);