fix(tui): drain stdin on exit to avoid Kitty release leak
Drain stdin for up to 1s after disabling Kitty protocol so in-flight key release events are consumed before the shell regains control. Fixes #1204
This commit is contained in:
@@ -2554,7 +2554,7 @@ export class InteractiveMode {
|
||||
|
||||
// Drain any in-flight Kitty key release events before stopping.
|
||||
// This prevents escape sequences from leaking to the parent shell over slow SSH.
|
||||
await this.ui.terminal.prepareForExit();
|
||||
await this.ui.terminal.drainInput(1000);
|
||||
|
||||
this.stop();
|
||||
process.exit(0);
|
||||
|
||||
Reference in New Issue
Block a user