mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
New option, mouse-select-pane. If on, the mouse may be used to select the
current pane. Suggested by sthen@ and also by someone else ages ago who I have forgotten.
This commit is contained in:
17
window.c
17
window.c
@ -304,6 +304,23 @@ window_set_active_pane(struct window *w, struct window_pane *wp)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
window_set_active_at(struct window *w, u_int x, u_int y)
|
||||
{
|
||||
struct window_pane *wp;
|
||||
|
||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||
if (!window_pane_visible(wp))
|
||||
continue;
|
||||
if (x < wp->xoff || x >= wp->xoff + wp->sx)
|
||||
continue;
|
||||
if (y < wp->yoff || y >= wp->yoff + wp->sy)
|
||||
continue;
|
||||
window_set_active_pane(w, wp);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
struct window_pane *
|
||||
window_add_pane(struct window *w, u_int hlimit)
|
||||
{
|
||||
|
Reference in New Issue
Block a user