mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
- New command display-message (alias display) to display a message in the
status line (bound to "i" and displays the current window and time by default). The same substitutions are applied as for status-left/right. - Add support for including the window index (#I), pane index (#P) and window name (#W) in the message, and status-left or status-right. - Bump protocol version. From Tiago Cunha, thanks!
This commit is contained in:
15
window.c
15
window.c
@ -379,6 +379,21 @@ window_pane_at_index(struct window *w, u_int idx)
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
u_int
|
||||
window_pane_index(struct window *w, struct window_pane *wp)
|
||||
{
|
||||
struct window_pane *wq;
|
||||
u_int n;
|
||||
|
||||
n = 0;
|
||||
TAILQ_FOREACH(wq, &w->panes, entry) {
|
||||
if (wp == wq)
|
||||
break;
|
||||
n++;
|
||||
}
|
||||
return (n);
|
||||
}
|
||||
|
||||
u_int
|
||||
window_count_panes(struct window *w)
|
||||
{
|
||||
|
Reference in New Issue
Block a user