aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-05-09 17:02:25 +0100
committerThomas Adam <thomas@xteddy.org>2019-05-09 17:02:25 +0100
commite5f06d2cf62737f5b4453e49951648fe0991905e (patch)
tree09e08ba00aea4d0f995a2a325569d530573c01e7
parent2e00d775e4aaf57ffe7293aaa486ca936708e049 (diff)
parentcb10bfb8effff694460af6927c30d8f805f8b9c0 (diff)
downloadrtmux-e5f06d2cf62737f5b4453e49951648fe0991905e.tar.gz
rtmux-e5f06d2cf62737f5b4453e49951648fe0991905e.tar.bz2
rtmux-e5f06d2cf62737f5b4453e49951648fe0991905e.zip
Merge branch 'obsd-master'
-rw-r--r--tmux.h1
-rw-r--r--tty-keys.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/tmux.h b/tmux.h
index 78b1af12..d7293ada 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1170,6 +1170,7 @@ struct tty {
u_int mouse_last_x;
u_int mouse_last_y;
+ u_int mouse_last_b;
int mouse_drag_flag;
void (*mouse_drag_update)(struct client *,
struct mouse_event *);
diff --git a/tty-keys.c b/tty-keys.c
index 3ab7f184..f70b2c8d 100644
--- a/tty-keys.c
+++ b/tty-keys.c
@@ -893,7 +893,7 @@ tty_keys_mouse(struct tty *tty, const char *buf, size_t len, size_t *size,
m->x = x;
m->ly = tty->mouse_last_y;
m->y = y;
- m->lb = m->b;
+ m->lb = tty->mouse_last_b;
m->b = b;
m->sgr_type = sgr_type;
m->sgr_b = sgr_b;
@@ -901,6 +901,7 @@ tty_keys_mouse(struct tty *tty, const char *buf, size_t len, size_t *size,
/* Update last mouse state. */
tty->mouse_last_x = x;
tty->mouse_last_y = y;
+ tty->mouse_last_b = b;
return (0);
}