Don't clear buffers on cleanup. (#12979)

This commit is contained in:
Tommaso Sciortino
2025-11-12 19:20:21 -08:00
committed by GitHub
parent 0e6e5a023e
commit 5e4d8a1f14
2 changed files with 0 additions and 32 deletions
@@ -593,16 +593,8 @@ export function KeypressProvider({
}
stdin.on('data', dataListener);
return () => {
// flush buffers by sending null key
backslashBufferer(null);
pasteBufferer(null);
// flush by sending empty string to the data listener
dataListener('');
stdin.removeListener('data', dataListener);
// Restore the terminal to its original state.
if (wasRaw === false) {
setRawMode(false);
}