Do not lose a pending pane resize when entering the alternate screen,

from mml00 dot work at gmail dot com.
This commit is contained in:
nicm
2026-10-05 08:41:23 +00:00
committed by tmux update bot
parent a1fd084d19
commit 3f5d054005

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: screen-write.c,v 1.298 2026/10/02 15:20:41 nicm Exp $ */
/* $OpenBSD: screen-write.c,v 1.299 2026/10/05 08:41:23 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -3154,6 +3154,7 @@ screen_write_alternateon(struct screen_write_ctx *ctx, struct grid_cell *gc,
{
struct tty_ctx ttyctx;
struct window_pane *wp = ctx->wp;
int pending;
if (wp != NULL && !options_get_number(wp->options, "alternate-screen"))
return;
@@ -3163,11 +3164,12 @@ screen_write_alternateon(struct screen_write_ctx *ctx, struct grid_cell *gc,
return;
if (wp != NULL) {
pending = !TAILQ_EMPTY(&wp->resize_queue);
window_pane_clear_resizes(wp, NULL);
if (event_initialized(&wp->resize_timer))
evtimer_del(&wp->resize_timer);
layout_fix_panes(wp->window, NULL);
if (!TAILQ_EMPTY(&wp->resize_queue)) {
if (pending || !TAILQ_EMPTY(&wp->resize_queue)) {
window_pane_send_resize(wp, wp->sx, wp->sy);
window_pane_clear_resizes(wp, NULL);
}