diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-07-17 18:45:08 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-07-17 18:45:08 +0000 |
commit | 6f5150a943425d7d5d65ae443f956931fcb82d0b (patch) | |
tree | c216bcb4894a8b6b330cc4775e8490e10a8b18b3 /window.c | |
parent | ad006bc6b66f335e87c0876d1b77af3541a4b517 (diff) | |
download | rtmux-6f5150a943425d7d5d65ae443f956931fcb82d0b.tar.gz rtmux-6f5150a943425d7d5d65ae443f956931fcb82d0b.tar.bz2 rtmux-6f5150a943425d7d5d65ae443f956931fcb82d0b.zip |
- 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!
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -380,6 +380,21 @@ window_pane_at_index(struct window *w, u_int idx) } 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) { struct window_pane *wp; |