summaryrefslogtreecommitdiffstats
path: root/screen-redraw.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2011-11-15 23:19:51 +0000
committerNicholas Marriott <nicm@openbsd.org>2011-11-15 23:19:51 +0000
commit57df44291634e1083fccf29ecccc8b1793647e50 (patch)
treec93759746d1f177de3bb0cca0909c6aa984bb81b /screen-redraw.c
parent9f738dd2fe01b5b70c07280450eed32614c561c2 (diff)
Make window_pane_index work the same as window_index, from Ben Boeckel.
Diffstat (limited to 'screen-redraw.c')
-rw-r--r--screen-redraw.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/screen-redraw.c b/screen-redraw.c
index 1abd719c..0a546bf7 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)