Went with this, I think line-at-a-time is fine for choose mode, most of our lists are pretty short.
On Mon, Apr 07, 2014 at 11:37:30AM +0100, Thomas Adam wrote: > 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; > } > ------------------------------------------------------------------------------ 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