mirror of https://github.com/tmux/tmux.git
Correctly detect which button was released on SGR mouse release events
SGR mouse release codes specify which button was released. Prior to this change, b would always be set to the last clicked button, interfering with mouse chording or applications tracking mouse states.pull/3919/head
parent
fc204bb5e5
commit
b00a5fc4a5
|
@ -622,6 +622,8 @@ server_client_check_mouse(struct client *c, struct key_event *event)
|
|||
} else if (MOUSE_RELEASE(m->b)) {
|
||||
type = UP;
|
||||
x = m->x, y = m->y, b = m->lb;
|
||||
if (m->sgr_type == 'm')
|
||||
b = m->sgr_b;
|
||||
log_debug("up at %u,%u", x, y);
|
||||
} else {
|
||||
if (c->flags & CLIENT_DOUBLECLICK) {
|
||||
|
|
Loading…
Reference in New Issue