I am still not convinced by this, I don't need more tests, I need good
reasons why we should do this - what is it useful for apart from
scrolling in less? Why shouldn't this be done in less itself? It can't
be that hard to make less support the mouse.


On Fri, Apr 11, 2014 at 06:08:04PM +0200, Marcel Partap wrote:
> No issues found in weeks of heavy use, please test anyway.
> ---
>  input-keys.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/input-keys.c b/input-keys.c
> index f092f97..1df8e98 100644
> --- a/input-keys.c
> +++ b/input-keys.c
> @@ -204,6 +204,20 @@ input_mouse(struct window_pane *wp, struct session *s, 
> struct mouse_event *m)
>       char                     buf[40];
>       size_t                   len;
>       struct paste_buffer     *pb;
> +     u_int                    i;
> +
> +     /* Mouse wheel used while shift is pressed, or when alternate screen is
> +      * active and not mouse aware. */
> +     if (m->event == MOUSE_EVENT_WHEEL && (m->xb & MOUSE_MASK_SHIFT ||
> +         (wp->saved_grid != NULL && !(wp->screen->mode & ALL_MOUSE_MODES)))) 
> {
> +             for (i = 0; i < m->scroll; i++) {
> +                     if (m->wheel == MOUSE_WHEEL_UP)
> +                             input_key(wp, KEYC_UP);
> +                     else
> +                             input_key(wp, KEYC_DOWN);
> +             }
> +             return;
> +     }
>  
>       if (wp->screen->mode & ALL_MOUSE_MODES) {
>               /*
> -- 
> 1.9.1
> 
> 
> ------------------------------------------------------------------------------
> Put Bad Developers to Shame
> Dominate Development with Jenkins Continuous Integration
> Continuously Automate Build, Test & Deployment 
> Start a new project now. Try Jenkins in the cloud.
> http://p.sf.net/sfu/13600_Cloudbees
> _______________________________________________
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to