Why not just remove the loop rather than writing over m->scroll? I'd add
a comment too.
On Sat, Apr 05, 2014 at 01:04:40PM +0100, Thomas Adam wrote:
> Hi,
>
> With the recent mouse-scrolling work, by default without pressing any
> keys, the decision is to scroll by three lines. This might make sense
> in window-copy mode, but it makes it really irritating when trying to go
> through items in a choose-* list, one-byy-one, without requiring
> pressing either CTRL or SHIFT or META, or whatever key it is to get it
> to scroll by one.
>
> Therefore, I'm proposing just to set m->scroll to 1, regardless of the
> state, when in choose-* mode. If you want to go straight to an item,
> you can click the thing with the mouse.
>
> See patch attached. Thoughts?
>
> -- Thomas Adam
>
> --
> "Deep in my heart I wish I was wrong. But deep in my heart I know I am
> not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)
> diff --git a/window-choose.c b/window-choose.c
> index e75858e..d3ba164 100644
> --- a/window-choose.c
> +++ b/window-choose.c
> @@ -724,6 +724,7 @@ window_choose_mouse(
> u_int i, idx;
>
> if (m->event == MOUSE_EVENT_WHEEL) {
> + m->scroll = 1;
> for (i = 0; i < m->scroll; i++) {
> if (m->wheel == MOUSE_WHEEL_UP)
> window_choose_key(wp, sess, KEYC_UP);
> ------------------------------------------------------------------------------
> _______________________________________________
> tmux-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tmux-users
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-users