On Mon, Apr 07, 2014 at 10:59:43AM +0100, Nicholas Marriott wrote:
>
> Why not just remove the loop rather than writing over m->scroll? I'd add
> a comment too.
Dunno. See attached; seems to work.
-- Thomas Adam
diff --git a/window-choose.c b/window-choose.c
index e75858e..ffd5c85 100644
--- a/window-choose.c
+++ b/window-choose.c
@@ -724,12 +724,14 @@ window_choose_mouse(
u_int i, idx;
if (m->event == MOUSE_EVENT_WHEEL) {
- for (i = 0; i < m->scroll; i++) {
- if (m->wheel == MOUSE_WHEEL_UP)
- window_choose_key(wp, sess, KEYC_UP);
- else
- window_choose_key(wp, sess, KEYC_DOWN);
- }
+ /* Unlike other scrolling events with the mouse, just move
+ * line-by-line through this list, otherwise it makes
+ * selecting specific entries awkward.
+ */
+ if (m->wheel == MOUSE_WHEEL_UP)
+ window_choose_key(wp, sess, KEYC_UP);
+ else
+ window_choose_key(wp, sess, KEYC_DOWN);
return;
}
------------------------------------------------------------------------------
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_APR
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users