aboutsummaryrefslogtreecommitdiff
path: root/status.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2011-11-25 13:30:45 +0000
committerTiago Cunha <tcunha@gmx.com>2011-11-25 13:30:45 +0000
commit9ec457575d0db6450d8a436426b4a705c49285aa (patch)
tree8347c9f9f85bab98096f56fbcfb48df496592158 /status.c
parent398af28d2a5a8a0e6fad0ecd8289a987fbf963f8 (diff)
downloadrtmux-9ec457575d0db6450d8a436426b4a705c49285aa.tar.gz
rtmux-9ec457575d0db6450d8a436426b4a705c49285aa.tar.bz2
rtmux-9ec457575d0db6450d8a436426b4a705c49285aa.zip
Sync OpenBSD patchset 979:
Make window_pane_index work the same as window_index, from Ben Boeckel.
Diffstat (limited to 'status.c')
-rw-r--r--status.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/status.c b/status.c
index 5db40b4b..ca3e9d43 100644
--- a/status.c
+++ b/status.c
@@ -372,6 +372,7 @@ status_replace1(struct client *c, struct session *s, struct winlink *wl,
char ch, tmp[256], *ptr, *endptr, *freeptr;
size_t ptrlen;
long limit;
+ u_int idx;
if (s == NULL)
s = c->session;
@@ -422,8 +423,10 @@ status_replace1(struct client *c, struct session *s, struct winlink *wl,
ptr = tmp;
goto do_replace;
case 'P':
+ if (window_pane_index(wp, &idx) != 0)
+ fatalx("index not found");
xsnprintf(
- tmp, sizeof tmp, "%u", window_pane_index(wl->window, wp));
+ tmp, sizeof tmp, "%u", idx);
ptr = tmp;
goto do_replace;
case 'S':