fix(terminal): keep the gap reset on the warning abandon path

The reset had been folded into an else of the unavailable-warning branch, so
the primary abandon path relied on the marker's earlier reset still standing.
It does not always: this function captures a replayingSnapshot, so it can run
after a partially-applied replay has already moved the pen, and the warning
itself is plain text carrying no SGR. Restore the unconditional write, guarded
only against the remote re-arm which writes its own.
This commit is contained in:
Brennan Benson
2026-08-13 11:04:53 -07:00
parent 952234a8ff
commit a72bdd0808
@@ -7067,7 +7067,12 @@ export function connectPanePty(
// backpressure must not outlive it — it would re-open recovery and banner a second time.
clearHiddenOutputRestoreFloodRepaintTimer()
writeRestoreUnavailableWarning()
} else if (!rearmedRemoteRestore) {
}
// Why not an else: the unavailable warning is plain text and carries no SGR
// of its own, so folding the reset into the other branch skipped it on the
// primary abandon path — the one that declares the bytes unrecoverable.
// Guarded only against the remote re-arm, which writes its own reset.
if (!rearmedRemoteRestore) {
writePtyOutputToXterm(RESET_AFTER_BYTE_GAP, true)
}
if (hadPendingOverflow) {