mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-11-06 00:15:06 +00:00
A program killed while it held kitty keyboard flags left its push on a stack. The prompt-time scrub (`CSI = 0 ; 1 u`) only rewrote the flags in effect, so the next pop, or the next program to enter the alternate screen, brought the dead program's flags back. Escape was then encoded as `CSI 27 u` and Ctrl+C as `CSI 99 ; 5 u`; behind ConPTY those arrive as key records with no virtual key, so Escape and Ctrl+C were lost (#1155). No escape sequence clears the stacks, so the alacritty fork gains `Term::reset_keyboard_modes`, which empties both screens' stacks and clears the flags in effect. The reader calls it when the shell's prompt returns, and at every OSC 133 A/B/D mark while replaying a pane on reattach. The daemon's `TerminalModes` forgets the stacks at the same marks, so the replay prelude does not push them back. Flags a program pushes after the prompt are untouched, and the key encoder is unchanged, so #895 keeps working. Bumps the alacritty pin to fe249ca8.