From d33d5b7de81e0af71feabe3bb9ee2cfb040ee39c Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 6 Jul 2026 15:41:31 +0000 Subject: [PATCH] When sync is enabled, we need to mark the whole scroll region dirty if there has been any scrolling. GitHub issue 5330. --- screen-write.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/screen-write.c b/screen-write.c index c1192e8ae..ebc40b484 100644 --- a/screen-write.c +++ b/screen-write.c @@ -2314,6 +2314,10 @@ screen_write_collect_flush(struct screen_write_ctx *ctx, int scroll_only, if (wp != NULL && (wp->flags & (PANE_REDRAW|PANE_DROP))) goto discard; if (s->mode & MODE_SYNC) { + if (ctx->scrolled != 0) { + screen_write_should_draw_lines(ctx, s->rupper, + s->rlower + 1 - s->rupper); + } for (y = 0; y < screen_size_y(s); y++) { cl = &s->write_list[y]; if (!TAILQ_EMPTY(&cl->items))