From f688653710857e8e345f073bf530278f6072d34e Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 12 May 2017 22:43:15 +0000 Subject: [PATCH 1/3] Remove an unused variable. --- format.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/format.c b/format.c index 559a9171..a0c654fb 100644 --- a/format.c +++ b/format.c @@ -194,7 +194,6 @@ format_job_update(struct job *job) struct format_job *fj = job->data; char *line; time_t t; - struct client *c; if ((line = evbuffer_readline(job->event->input)) == NULL) return; @@ -298,6 +297,7 @@ format_job_get(struct format_tree *ft, const char *cmd) xasprintf(&fj->out, "<'%s' didn't start>", fj->cmd); } fj->last = t; + fj->updated = 0; } if (ft->flags & FORMAT_STATUS) From 0264ef094a79c828e72e03052b9969cd80b28d16 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 12 May 2017 23:06:43 +0000 Subject: [PATCH 2/3] Can scroll away full lines to clear them too. --- tty.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tty.c b/tty.c index 58a4028c..a03e9a0d 100644 --- a/tty.c +++ b/tty.c @@ -830,12 +830,25 @@ tty_clear_area(struct tty *tty, const struct window_pane *wp, u_int py, return; } + /* Full lines can be scrolled away to clear them. */ + if (px == 0 && + px + nx > tty->sx && + ny > 2 && + tty_term_has(tty->term, TTYC_CSR) && + tty_term_has(tty->term, TTYC_INDN)) { + tty_region(tty, py, py + ny - 1); + tty_margin_off(tty); + tty_putcode1(tty, TTYC_INDN, ny); + return; + } + /* * If margins are supported, can just scroll the area off to * clear it. */ if (nx > 2 && ny > 2 && + tty_term_has(tty->term, TTYC_CSR) && tty_use_margin(tty) && tty_term_has(tty->term, TTYC_INDN)) { tty_region(tty, py, py + ny - 1); From 50f1f1dce964d0f09d2ea2abba2abe093e775194 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 12 May 2017 23:10:19 +0000 Subject: [PATCH 3/3] Compare >= for columns not >. --- tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tty.c b/tty.c index a03e9a0d..d638f7d0 100644 --- a/tty.c +++ b/tty.c @@ -832,7 +832,7 @@ tty_clear_area(struct tty *tty, const struct window_pane *wp, u_int py, /* Full lines can be scrolled away to clear them. */ if (px == 0 && - px + nx > tty->sx && + px + nx >= tty->sx && ny > 2 && tty_term_has(tty->term, TTYC_CSR) && tty_term_has(tty->term, TTYC_INDN)) {