Support more mouse buttons when the terminal sends them, GitHub issue

3055.
This commit is contained in:
nicm
2022-02-16 18:55:05 +00:00
parent 5076beb009
commit 0027ee13a0
7 changed files with 728 additions and 44 deletions

View File

@ -578,13 +578,13 @@ input_key_get_mouse(struct screen *s, struct mouse_event *m, u_int x, u_int y,
*/
if (m->sgr_type != ' ') {
if (MOUSE_DRAG(m->sgr_b) &&
MOUSE_BUTTONS(m->sgr_b) == 3 &&
MOUSE_RELEASE(m->sgr_b) &&
(~s->mode & MODE_MOUSE_ALL))
return (0);
} else {
if (MOUSE_DRAG(m->b) &&
MOUSE_BUTTONS(m->b) == 3 &&
MOUSE_BUTTONS(m->lb) == 3 &&
MOUSE_RELEASE(m->b) &&
MOUSE_RELEASE(m->lb) &&
(~s->mode & MODE_MOUSE_ALL))
return (0);
}