From b5f9293014da642c21dcf8bfdb15db65a62ecbd1 Mon Sep 17 00:00:00 2001 From: Michael Grant Date: Mon, 13 Oct 2025 08:45:32 +0100 Subject: [PATCH] Possible fixes leak --- cmd-split-window.c | 4 ++-- screen-write.c | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cmd-split-window.c b/cmd-split-window.c index 564f7daf..82bdbfdc 100644 --- a/cmd-split-window.c +++ b/cmd-split-window.c @@ -262,8 +262,8 @@ cmd_new_floating_window_exec(struct cmd *self, struct cmdq_item *item) return (CMD_RETURN_ERROR); } } - sc.xoff = 10; - sc.yoff = 10; + sc.xoff = 20; + sc.yoff = 20; sc.sx = sx; sc.sy = sy; diff --git a/screen-write.c b/screen-write.c index 6bba95ce..ac6415cb 100644 --- a/screen-write.c +++ b/screen-write.c @@ -1797,10 +1797,14 @@ screen_write_collect_scroll(struct screen_write_ctx *ctx, u_int bg) TAILQ_REMOVE(&cl_src->items, ci, entry); } } + if (! TAILQ_EMPTY(&cl_src->items)) { + screen_write_collect_clear(ctx, y+1, 1); + TAILQ_INIT(&cl_src->items); + } ctx->s->write_list[y].data = cl_src->data; } s->write_list[s->rlower].data = saved; - + return; /* Also worked without this clear, is this needed? */ ci = screen_write_get_citem(); ci->x = 0;