From 972a6f565660a7ca5c0307c1085825a254fba20e Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 12 Oct 2009 09:16:59 +0000 Subject: [PATCH] _absolute is redundant, just use tty_region. --- server.c | 2 +- tmux.h | 2 +- tty.c | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/server.c b/server.c index fab8d886..6360be1d 100644 --- a/server.c +++ b/server.c @@ -1050,7 +1050,7 @@ server_handle_client(struct client *c) * tty_region/tty_reset/tty_update_mode already take care of not * resetting things that are already in their default state. */ - tty_region_absolute(&c->tty, 0, c->tty.sy - 1); + tty_region(&c->tty, 0, c->tty.sy - 1); status = options_get_number(oo, "status"); if (!window_pane_visible(wp) || wp->yoff + s->cy >= c->tty.sy - status) diff --git a/tmux.h b/tmux.h index 179c030a..0b1ba198 100644 --- a/tmux.h +++ b/tmux.h @@ -1248,7 +1248,7 @@ u_char tty_get_acs(struct tty *, u_char); void tty_attributes(struct tty *, const struct grid_cell *); void tty_reset(struct tty *); void tty_region_pane(struct tty *, const struct tty_ctx *, u_int, u_int); -void tty_region_absolute(struct tty *, u_int, u_int); +void tty_region(struct tty *, u_int, u_int); void tty_cursor(struct tty *, u_int, u_int, u_int, u_int); void tty_putcode(struct tty *, enum tty_code_code); void tty_putcode1(struct tty *, enum tty_code_code, int); diff --git a/tty.c b/tty.c index fd271335..bddb83e3 100644 --- a/tty.c +++ b/tty.c @@ -893,17 +893,19 @@ tty_reset(struct tty *tty) memcpy(gc, &grid_default_cell, sizeof *gc); } +/* Set region inside pane. */ void tty_region_pane( struct tty *tty, const struct tty_ctx *ctx, u_int rupper, u_int rlower) { struct window_pane *wp = ctx->wp; - tty_region_absolute(tty, wp->yoff + rupper, wp->yoff + rlower); + tty_region(tty, wp->yoff + rupper, wp->yoff + rlower); } +/* Set region at absolute position. */ void -tty_region_absolute(struct tty *tty, u_int rupper, u_int rlower) +tty_region(struct tty *tty, u_int rupper, u_int rlower) { if (tty->rlower == rlower && tty->rupper == rupper) return;