Discard queued data and clear offsets when turning pane off to prevent

later read of data that has been removed. From Aaron Campbell in GitHub
issue 5054.
This commit is contained in:
nicm
2026-05-05 12:02:12 +00:00
parent d52fabce72
commit cae229cadc

View File

@@ -356,6 +356,9 @@ control_set_pane_off(struct client *c, struct window_pane *wp)
struct control_pane *cp;
cp = control_add_pane(c, wp);
control_discard_pane(c, cp);
memcpy(&cp->offset, &wp->offset, sizeof cp->offset);
memcpy(&cp->queued, &wp->offset, sizeof cp->queued);
cp->flags |= CONTROL_PANE_OFF;
}