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-resize-pane.c | |
parent | 3635b3cd6c3343b2ec3f7173facef8a284e7e613 (diff) |
Correctly adjust mouse position if the status line is at the top and
more than one line. GitHub issue 1822.
Diffstat (limited to 'cmd-resize-pane.c')
-rw-r--r-- | cmd-resize-pane.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd-resize-pane.c b/cmd-resize-pane.c index c978edfb..8d35d96f 100644 --- a/cmd-resize-pane.c +++ b/cmd-resize-pane.c @@ -144,13 +144,13 @@ cmd_resize_pane_mouse_update(struct client *c, struct mouse_event *m) w = wl->window; y = m->y + m->oy; x = m->x + m->ox; - if (m->statusat == 0 && y > 0) - y--; + if (m->statusat == 0 && y >= m->statuslines) + y -= m->statuslines; else if (m->statusat > 0 && y >= (u_int)m->statusat) y = m->statusat - 1; ly = m->ly + m->oy; lx = m->lx + m->ox; - if (m->statusat == 0 && ly > 0) - ly--; + if (m->statusat == 0 && ly >= m->statuslines) + ly -= m->statuslines; else if (m->statusat > 0 && ly >= (u_int)m->statusat) ly = m->statusat - 1; |