diff options
author | Tiago Cunha <tcunha@gmx.com> | 2011-11-25 13:30:45 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2011-11-25 13:30:45 +0000 |
commit | 9ec457575d0db6450d8a436426b4a705c49285aa (patch) | |
tree | 8347c9f9f85bab98096f56fbcfb48df496592158 /screen-redraw.c | |
parent | 398af28d2a5a8a0e6fad0ecd8289a987fbf963f8 (diff) |
Sync OpenBSD patchset 979:
Make window_pane_index work the same as window_index, from Ben Boeckel.
Diffstat (limited to 'screen-redraw.c')
-rw-r--r-- | screen-redraw.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/screen-redraw.c b/screen-redraw.c index a12fa365..c9e05420 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -264,7 +264,7 @@ screen_redraw_draw_number(struct client *c, struct window_pane *wp) { struct tty *tty = &c->tty; struct session *s = c->session; - struct options *oo = &s->options; + struct options *oo = &s->options; struct window *w = wp->window; struct grid_cell gc; u_int idx, px, py, i, j, xoff, yoff; @@ -272,7 +272,8 @@ screen_redraw_draw_number(struct client *c, struct window_pane *wp) char buf[16], *ptr; size_t len; - idx = window_pane_index(w, wp); + if (window_pane_index(wp, &idx) != 0) + fatalx("index not found"); len = xsnprintf(buf, sizeof buf, "%u", idx); if (wp->sx < len) |