Cotal TypeScript packages
    Preparing search index...

    Interface TerminalHold

    The operator's terminal, held ACROSS attach attempts. A reconnect re-establishes the SESSION, not the terminal: restoring raw mode and leaving the child's alternate screen between attempts would flash the shell's screen back and then repaint over it, which is exactly the garble the reconnect is supposed to spare the operator. So the two facts that outlive one session — the mode the terminal was in before we touched it, and whether the child has us in its alternate screen — live here, and the undo runs exactly once, when the attach really ends.

    attachClient creates its own when no hold is passed, which is the one-shot behaviour: enter on ready, undo on end.

    interface TerminalHold {
        altScreen: boolean;
        enterRaw(): void;
        restore(): void;
    }
    Index
    altScreen: boolean

    Is the child in its alternate screen right now? Carried across reconnects so the final undo leaves that buffer exactly when the child put us there.