mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 11:18:48 +00:00
Change window with mouse wheel over status line if mouse-select-window
is on, from marcel partap.
This commit is contained in:
parent
a70df70d20
commit
b0a88ebead
@ -325,11 +325,24 @@ server_client_handle_key(int key, struct mouse_event *mouse, void *data)
|
|||||||
server_redraw_window_borders(w);
|
server_redraw_window_borders(w);
|
||||||
wp = w->active;
|
wp = w->active;
|
||||||
}
|
}
|
||||||
if (mouse->y + 1 == c->tty.sy && mouse->b == MOUSE_UP &&
|
if (mouse->y + 1 == c->tty.sy &&
|
||||||
options_get_number(oo, "mouse-select-window") &&
|
options_get_number(oo, "mouse-select-window") &&
|
||||||
options_get_number(oo, "status")) {
|
options_get_number(oo, "status")) {
|
||||||
status_set_window_at(c, mouse->x);
|
if (mouse->b == MOUSE_UP) {
|
||||||
return;
|
status_set_window_at(c, mouse->x);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (mouse->b & MOUSE_45) {
|
||||||
|
if ((mouse->b & MOUSE_BUTTON) == MOUSE_1) {
|
||||||
|
session_previous(c->session, 0);
|
||||||
|
server_redraw_session(s);
|
||||||
|
}
|
||||||
|
if ((mouse->b & MOUSE_BUTTON) == MOUSE_2) {
|
||||||
|
session_next(c->session, 0);
|
||||||
|
server_redraw_session(s);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
window_pane_mouse(wp, c->session, mouse);
|
window_pane_mouse(wp, c->session, mouse);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user