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

Reply via email to