diff options
author | Thomas Adam <thomas@xteddy.org> | 2014-04-23 11:26:11 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2014-04-23 11:26:11 +0100 |
commit | 953c3ef47a1933d38308075c1bacc7ea8d38301b (patch) | |
tree | 6484bdd51ecedbb5888717db271c151257ec87f5 /window-choose.c | |
parent | 12e9c974fadc5ed6f0e7db10c40d5a0d55e0da8a (diff) | |
parent | 64613b9d411a7c76a50a2f9c66df345f082fce25 (diff) | |
download | rtmux-953c3ef47a1933d38308075c1bacc7ea8d38301b.tar.gz rtmux-953c3ef47a1933d38308075c1bacc7ea8d38301b.tar.bz2 rtmux-953c3ef47a1933d38308075c1bacc7ea8d38301b.zip |
Merge branch 'obsd-master'
Conflicts:
Makefile
tmux.1
window.c
Diffstat (limited to 'window-choose.c')
-rw-r--r-- | window-choose.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/window-choose.c b/window-choose.c index e75858ef..86f37ed5 100644 --- a/window-choose.c +++ b/window-choose.c @@ -715,21 +715,23 @@ window_choose_key(struct window_pane *wp, unused struct session *sess, int key) } void -window_choose_mouse( - struct window_pane *wp, unused struct session *sess, struct mouse_event *m) +window_choose_mouse(struct window_pane *wp, struct session *sess, + struct mouse_event *m) { struct window_choose_mode_data *data = wp->modedata; struct screen *s = &data->screen; struct window_choose_mode_item *item; - u_int i, idx; + u_int 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); - } + /* + * Don't use m->scroll and just move line-by-line or it's + * annoying. + */ + if (m->wheel == MOUSE_WHEEL_UP) + window_choose_key(wp, sess, KEYC_UP); + else + window_choose_key(wp, sess, KEYC_DOWN); return; } |