Feels somewhat more natural. Objections?
---
 window-choose.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/window-choose.c b/window-choose.c
index 9406b9c..8f1ab5c 100644
--- a/window-choose.c
+++ b/window-choose.c
@@ -726,10 +726,13 @@ window_choose_mouse(
        if (m->event == MOUSE_EVENT_WHEEL) {
                /* Fine-grained scrolling in choice-mode. */
                for (i = 0; i < (m->scroll > 3 ? m->scroll/3 : 1); i++) {
-                       if (m->wheel == MOUSE_WHEEL_UP)
-                               window_choose_key(wp, sess, KEYC_UP);
+                       if (m->wheel == MOUSE_WHEEL_UP) {
+                               if (data->selected != data->top)
+                                       window_choose_key(wp, sess, KEYC_UP);
+                       }
                        else
-                               window_choose_key(wp, sess, KEYC_DOWN);
+                               if(data->selected < ARRAY_LENGTH(&data->list) - 
1)
+                                       window_choose_key(wp, sess, KEYC_DOWN);
                }
                return;
        }
-- 
1.9.2


------------------------------------------------------------------------------
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