Update of /cvsroot/tmux/tmux
In directory vz-cvs-2.sog:/tmp/cvs-serv25843

Modified Files:
        server-client.c 
Log Message:
Sync OpenBSD patchset 903:

Change window with mouse wheel over status line if mouse-select-window
is on, from marcel partap.


Index: server-client.c
===================================================================
RCS file: /cvsroot/tmux/tmux/server-client.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- server-client.c     5 May 2011 10:03:05 -0000       1.58
+++ server-client.c     5 May 2011 10:12:33 -0000       1.59
@@ -324,11 +324,24 @@
                        server_redraw_window_borders(w);
                        wp = w->active;
                }
-               if (mouse->y + 1 == c->tty.sy && mouse->b == MOUSE_UP &&
+               if (mouse->y + 1 == c->tty.sy &&
                    options_get_number(oo, "mouse-select-window") &&
                    options_get_number(oo, "status")) {
-                       status_set_window_at(c, mouse->x);
-                       return;
+                       if (mouse->b == MOUSE_UP) {
+                               status_set_window_at(c, mouse->x);
+                               return;
+                       }
+                       if (mouse->b & MOUSE_45) {
+                               if ((mouse->b & MOUSE_BUTTON) == MOUSE_1) {
+                                       session_previous(c->session, 0);
+                                       server_redraw_session(s);
+                               }
+                               if ((mouse->b & MOUSE_BUTTON) == MOUSE_2) {
+                                       session_next(c->session, 0);
+                                       server_redraw_session(s);
+                               }
+                               return;
+                       }
                }
                window_pane_mouse(wp, c->session, mouse);
                return;


------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
tmux-cvs mailing list
tmux-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to