mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Add an option (mouse-select-window) which allows the mouse to be used by
clicking on the status line, written by hsim at gmx dot li.
This commit is contained in:
@ -319,6 +319,12 @@ server_client_handle_key(int key, struct mouse_event *mouse, void *data)
|
||||
server_redraw_window_borders(w);
|
||||
wp = w->active;
|
||||
}
|
||||
if (mouse->y + 1 == c->tty.sy && mouse->b == MOUSE_UP &&
|
||||
options_get_number(oo, "mouse-select-window") &&
|
||||
options_get_number(oo, "status")) {
|
||||
status_set_window_at(c, mouse->x);
|
||||
return;
|
||||
}
|
||||
window_pane_mouse(wp, c->session, mouse);
|
||||
return;
|
||||
}
|
||||
@ -459,6 +465,10 @@ server_client_reset_state(struct client *c)
|
||||
(mode & ALL_MOUSE_MODES) == 0)
|
||||
mode |= MODE_MOUSE_STANDARD;
|
||||
|
||||
if (options_get_number(oo, "mouse-select-window") &&
|
||||
(mode & ALL_MOUSE_MODES) == 0)
|
||||
mode |= MODE_MOUSE_STANDARD;
|
||||
|
||||
/*
|
||||
* Set UTF-8 mouse input if required. If the terminal is UTF-8, the
|
||||
* user has set mouse-utf8 and any mouse mode is in effect, turn on
|
||||
|
Reference in New Issue
Block a user