diff options
author | nicm <nicm> | 2019-07-06 20:56:34 +0000 |
---|---|---|
committer | nicm <nicm> | 2019-07-06 20:56:34 +0000 |
commit | ddf53d6e4e76463e6d777b2de7304572333935e9 (patch) | |
tree | 11195c56e3699e1a9dc8e96b2054ef4505770dda /cmd.c | |
parent | 3635b3cd6c3343b2ec3f7173facef8a284e7e613 (diff) | |
download | rtmux-ddf53d6e4e76463e6d777b2de7304572333935e9.tar.gz rtmux-ddf53d6e4e76463e6d777b2de7304572333935e9.tar.bz2 rtmux-ddf53d6e4e76463e6d777b2de7304572333935e9.zip |
Correctly adjust mouse position if the status line is at the top and
more than one line. GitHub issue 1822.
Diffstat (limited to 'cmd.c')
-rw-r--r-- | cmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |