From c363c236aaea5b7a879493d8f3c85bead546f063 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 22 Dec 2017 23:16:41 +0000 Subject: Fix memory leak in screen_redraw_make_pane_status. --- screen-redraw.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/screen-redraw.c b/screen-redraw.c index 7a31182a..1083642d 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -18,6 +18,7 @@ #include +#include #include #include "tmux.h" @@ -299,6 +300,7 @@ screen_redraw_make_pane_status(struct client *c, struct window *w, screen_write_cnputs(&ctx, outlen, &gc, "%s", out); screen_write_stop(&ctx); + free(out); format_free(ft); wp->status_size = outlen; -- cgit From 937f8ed095ea89b2ecbe7bf4e2922afc8afbf3eb Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 27 Dec 2017 13:55:42 +0000 Subject: Draw command prompt correctly with status line off. --- status.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/status.c b/status.c index 9886eebb..fffdb327 100644 --- a/status.c +++ b/status.c @@ -659,9 +659,10 @@ status_message_redraw(struct client *c) memcpy(&old_status, &c->status, sizeof old_status); lines = status_line_size(c->session); - if (lines <= 1) + if (lines <= 1) { + lines = 1; screen_init(&c->status, c->tty.sx, 1, 0); - else + } else screen_init(&c->status, c->tty.sx, lines, 0); len = screen_write_strlen("%s", c->message_string); @@ -811,9 +812,10 @@ status_prompt_redraw(struct client *c) memcpy(&old_status, &c->status, sizeof old_status); lines = status_line_size(c->session); - if (lines <= 1) + if (lines <= 1) { + lines = 1; screen_init(&c->status, c->tty.sx, 1, 0); - else + } else screen_init(&c->status, c->tty.sx, lines, 0); len = screen_write_strlen("%s", c->prompt_string); -- cgit