summaryrefslogtreecommitdiffstats
path: root/server-client.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 /server-client.c
parentbc112a8c8990f272144b482e13c1ce32ac9722e0 (diff)
parentddf53d6e4e76463e6d777b2de7304572333935e9 (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'server-client.c')
-rw-r--r--server-client.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/server-client.c b/server-client.c
index a45b1e0a..d801cfe5 100644
--- a/server-client.c
+++ b/server-client.c
@@ -522,9 +522,10 @@ have_event:
/* Is this on the status line? */
m->statusat = status_at_line(c);
+ m->statuslines = status_line_size(c);
if (m->statusat != -1 &&
y >= (u_int)m->statusat &&
- y < m->statusat + status_line_size(c)) {
+ y < m->statusat + m->statuslines) {
sr = status_get_range(c, x, y - m->statusat);
if (sr == NULL) {
where = STATUS_DEFAULT;
@@ -553,8 +554,8 @@ have_event:
/* Not on status line. Adjust position and check for border or pane. */
if (where == NOWHERE) {
px = x;
- if (m->statusat == 0 && y > 0)
- py = y - 1;
+ if (m->statusat == 0 && y >= m->statuslines)
+ py = y - m->statuslines;
else if (m->statusat > 0 && y >= (u_int)m->statusat)
py = m->statusat - 1;
else