aboutsummaryrefslogtreecommitdiff
path: root/cmd-resize-pane.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-07-06 23:02:26 +0100
committerThomas Adam <thomas@xteddy.org>2019-07-06 23:02:26 +0100
commit3a4cf62aa9819472a26f0ed3c3101d7556184656 (patch)
treeda8ac1f44535bf4565a62148a3cb838fb3d80ff0 /cmd-resize-pane.c
parentbc112a8c8990f272144b482e13c1ce32ac9722e0 (diff)
parentddf53d6e4e76463e6d777b2de7304572333935e9 (diff)
downloadrtmux-3a4cf62aa9819472a26f0ed3c3101d7556184656.tar.gz
rtmux-3a4cf62aa9819472a26f0ed3c3101d7556184656.tar.bz2
rtmux-3a4cf62aa9819472a26f0ed3c3101d7556184656.zip
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-resize-pane.c')
-rw-r--r--cmd-resize-pane.c8
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;