On 2014-05-27 13:58 +0100, Nicholas Marriott wrote:
> --- tty-keys.c 8 May 2014 07:54:47 -0000 1.66
> +++ tty-keys.c 27 May 2014 12:58:40 -0000
> @@ -782,8 +782,8 @@ tty_keys_mouse(struct tty *tty, const ch
> m->sy = y;
> m->event = MOUSE_EVENT_DOWN;
> }
> - m->button = (b & MOUSE_MASK_BUTTONS);
> }
> + m->button = (b & MOUSE_MASK_BUTTONS);
>
> return (0);
> }
Yeah, that was my first try, but unfortunately that doesn't work. A few
lines above you have this stanza:
} else if ((b & MOUSE_MASK_BUTTONS) == 3) {
if (~m->event & MOUSE_EVENT_DRAG && x == m->x && y == m->y)
m->event = MOUSE_EVENT_CLICK;
else
m->event = MOUSE_EVENT_DRAG;
m->event |= MOUSE_EVENT_UP;
}
This means that MOUSE_EVENT_CLICK will be generated only when (b &
MOUSE_MASK_BUTTONS) is 3. Three here means "released". So you would lose
the info which button was clicked. In input-keys.c the line
if (m->button == 1 && (m->event & MOUSE_EVENT_CLICK) &&
would never be true - you lose the ability to paste on middle click.
> Hmm, can you try this please instead? I don't have a mouse wheel...
Do you have a touchpad? Most of those can be configured to work as a
mouse wheel in case you would like to test this yourself.
--
Balazs
------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
tmux-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-users