aboutsummaryrefslogtreecommitdiff
path: root/cmd.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-05-03 19:02:27 +0100
committerThomas Adam <thomas@xteddy.org>2019-05-03 19:02:27 +0100
commita14512e23ef902ee0e1ef3188069f4a747dbbb6d (patch)
tree8b64f237c291aefbc9240e33738d29f964a1f34d /cmd.c
parent43656d4ea7cb70e3e50b73405f71def5e322c94c (diff)
parentfc3d85e34bf323762ac000b44bfd4a6b33aad37c (diff)
downloadrtmux-a14512e23ef902ee0e1ef3188069f4a747dbbb6d.tar.gz
rtmux-a14512e23ef902ee0e1ef3188069f4a747dbbb6d.tar.bz2
rtmux-a14512e23ef902ee0e1ef3188069f4a747dbbb6d.zip
Merge branch 'obsd-master'
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/cmd.c b/cmd.c
index 8d61a572..13d0570f 100644
--- a/cmd.c
+++ b/cmd.c
@@ -480,17 +480,16 @@ cmd_mouse_at(struct window_pane *wp, struct mouse_event *m, u_int *xp,
u_int x, y;
if (last) {
- x = m->lx;
- y = m->ly;
+ x = m->lx + m->ox;
+ y = m->ly + m->oy;
} else {
x = m->x;
y = m->y;
}
+ log_debug("%s: x=%u, y=%u%s", __func__, x, y, last ? " (last)" : "");
if (m->statusat == 0 && y > 0)
y--;
- else if (m->statusat > 0 && y >= (u_int)m->statusat)
- y = m->statusat - 1;
if (x < wp->xoff || x >= wp->xoff + wp->sx)
return (-1);