diff options
author | Thomas Adam <thomas@xteddy.org> | 2015-05-09 12:51:41 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2015-05-09 12:52:38 +0100 |
commit | 504b97b6a4314a7a052d9b05de746515e2a03628 (patch) | |
tree | 6b6316b7f7d35725bd0ce2377adae1847cc324da /screen-redraw.c | |
parent | 6525ca51584636ef781bda147d37d5d0d10899e0 (diff) | |
parent | 92faa2eaebd32117f01b0b7d7ae81abdfde2d935 (diff) | |
download | rtmux-504b97b6a4314a7a052d9b05de746515e2a03628.tar.gz rtmux-504b97b6a4314a7a052d9b05de746515e2a03628.tar.bz2 rtmux-504b97b6a4314a7a052d9b05de746515e2a03628.zip |
Merge branch 'obsd-master'
Conflicts:
tmux.h
Diffstat (limited to 'screen-redraw.c')
-rw-r--r-- | screen-redraw.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/screen-redraw.c b/screen-redraw.c index e3369b82..babc74a9 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -32,7 +32,7 @@ int screen_redraw_check_active(u_int, u_int, int, struct window *, void screen_redraw_draw_borders(struct client *, int, u_int); void screen_redraw_draw_panes(struct client *, u_int); void screen_redraw_draw_status(struct client *, u_int); -void screen_redraw_draw_number(struct client *, struct window_pane *); +void screen_redraw_draw_number(struct client *, struct window_pane *, u_int); #define CELL_INSIDE 0 #define CELL_LEFTRIGHT 1 @@ -354,7 +354,7 @@ screen_redraw_draw_panes(struct client *c, u_int top) for (i = 0; i < wp->sy; i++) tty_draw_pane(tty, wp, i, wp->xoff, top + wp->yoff); if (c->flags & CLIENT_IDENTIFY) - screen_redraw_draw_number(c, wp); + screen_redraw_draw_number(c, wp, top); } } @@ -372,7 +372,7 @@ screen_redraw_draw_status(struct client *c, u_int top) /* Draw number on a pane. */ void -screen_redraw_draw_number(struct client *c, struct window_pane *wp) +screen_redraw_draw_number(struct client *c, struct window_pane *wp, u_int top) { struct tty *tty = &c->tty; struct session *s = c->session; @@ -396,6 +396,9 @@ screen_redraw_draw_number(struct client *c, struct window_pane *wp) px = wp->sx / 2; py = wp->sy / 2; xoff = wp->xoff; yoff = wp->yoff; + if (top) + yoff++; + if (wp->sx < len * 6 || wp->sy < 5) { tty_cursor(tty, xoff + px - len / 2, yoff + py); goto draw_text; |