diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-07-17 18:32:54 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-07-17 18:32:54 +0000 |
commit | ae7dda10ceaf340fdeb4b365b79ca77789ebd844 (patch) | |
tree | 0e383c65c0da8455c9d9ed17a35c1648a7c8f508 /window.c | |
parent | 646632de1d1d88049c8e06604214104c99b9c97d (diff) | |
download | rtmux-ae7dda10ceaf340fdeb4b365b79ca77789ebd844.tar.gz rtmux-ae7dda10ceaf340fdeb4b365b79ca77789ebd844.tar.bz2 rtmux-ae7dda10ceaf340fdeb4b365b79ca77789ebd844.zip |
- New command display-message (alias display) to display a message in the
status line (bound to "i" by default).
- Add support for including the window index, pane index, and window name
in status-left, or status-right.
- Bump protocol version.
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: window.c,v 1.93 2009-07-15 17:45:09 nicm Exp $ */ +/* $Id: window.c,v 1.94 2009-07-17 18:32:54 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -378,6 +378,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; |