mirror of
https://github.com/tmux/tmux.git
synced 2026-10-12 21:54:23 +00:00
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:
@@ -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>
|
* 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 tty_ctx ttyctx;
|
||||||
struct window_pane *wp = ctx->wp;
|
struct window_pane *wp = ctx->wp;
|
||||||
|
int pending;
|
||||||
|
|
||||||
if (wp != NULL && !options_get_number(wp->options, "alternate-screen"))
|
if (wp != NULL && !options_get_number(wp->options, "alternate-screen"))
|
||||||
return;
|
return;
|
||||||
@@ -3163,11 +3164,12 @@ screen_write_alternateon(struct screen_write_ctx *ctx, struct grid_cell *gc,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (wp != NULL) {
|
if (wp != NULL) {
|
||||||
|
pending = !TAILQ_EMPTY(&wp->resize_queue);
|
||||||
window_pane_clear_resizes(wp, NULL);
|
window_pane_clear_resizes(wp, NULL);
|
||||||
if (event_initialized(&wp->resize_timer))
|
if (event_initialized(&wp->resize_timer))
|
||||||
evtimer_del(&wp->resize_timer);
|
evtimer_del(&wp->resize_timer);
|
||||||
layout_fix_panes(wp->window, NULL);
|
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_send_resize(wp, wp->sx, wp->sy);
|
||||||
window_pane_clear_resizes(wp, NULL);
|
window_pane_clear_resizes(wp, NULL);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user