From aace1ead1e711412e4be0287972a389248583ad6 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 18 Apr 2017 15:27:47 +0000 Subject: Do not check for BCE for a background colour that isn't needed, use colour 8 instead. --- tty.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tty.c') diff --git a/tty.c b/tty.c index 43ea1749..2776f145 100644 --- a/tty.c +++ b/tty.c @@ -880,7 +880,7 @@ tty_cmd_clearcharacter(struct tty *tty, const struct tty_ctx *ctx) tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); if (tty_term_has(tty->term, TTYC_ECH) && - !tty_fake_bce(tty, ctx->wp, ctx->bg)) + !tty_fake_bce(tty, ctx->wp, 8)) tty_putcode1(tty, TTYC_ECH, ctx->num); else tty_repeat_space(tty, ctx->num); @@ -989,7 +989,7 @@ tty_cmd_reverseindex(struct tty *tty, const struct tty_ctx *ctx) return; if (!tty_pane_full_width(tty, ctx) || - tty_fake_bce(tty, ctx->wp, ctx->bg) || + tty_fake_bce(tty, ctx->wp, 8) || !tty_term_has(tty->term, TTYC_CSR) || !tty_term_has(tty->term, TTYC_RI)) { tty_redraw_region(tty, ctx); @@ -1014,7 +1014,7 @@ tty_cmd_linefeed(struct tty *tty, const struct tty_ctx *ctx) return; if ((!tty_pane_full_width(tty, ctx) && !tty_use_margin(tty)) || - tty_fake_bce(tty, wp, ctx->bg) || + tty_fake_bce(tty, wp, 8) || !tty_term_has(tty->term, TTYC_CSR)) { tty_redraw_region(tty, ctx); return; @@ -1045,7 +1045,7 @@ tty_cmd_scrollup(struct tty *tty, const struct tty_ctx *ctx) u_int i; if ((!tty_pane_full_width(tty, ctx) && !tty_use_margin(tty)) || - tty_fake_bce(tty, wp, ctx->bg) || + tty_fake_bce(tty, wp, 8) || !tty_term_has(tty->term, TTYC_CSR)) { tty_redraw_region(tty, ctx); return; -- cgit From fb3c5efa503214b08cae72f89e73ed4eb1bf957c Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 18 Apr 2017 15:44:17 +0000 Subject: Add a format for number of bytes writtent to client, useful for debugging. --- tty.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tty.c') diff --git a/tty.c b/tty.c index 2776f145..14906cc3 100644 --- a/tty.c +++ b/tty.c @@ -427,6 +427,7 @@ tty_add(struct tty *tty, const char *buf, size_t len) evbuffer_add(tty->out, buf, len); log_debug("%s: %.*s", c->name, (int)len, (const char *)buf); + tty->written += len; if (tty_log_fd != -1) write(tty_log_fd, buf, len); -- cgit