@xp266/dshtui 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.mjs +4 -0
- package/package.json +1 -1
- package/src/ui/app.tsx +8 -1
package/lib/index.mjs
CHANGED
|
@@ -9143,6 +9143,10 @@ function App({ bridge, screen, themeTick = 0 }) {
|
|
|
9143
9143
|
if (!exiting.current) {
|
|
9144
9144
|
exiting.current = true;
|
|
9145
9145
|
restoreAllModes();
|
|
9146
|
+
try {
|
|
9147
|
+
process.stdin.setRawMode(false);
|
|
9148
|
+
process.stdin.pause();
|
|
9149
|
+
} catch {}
|
|
9146
9150
|
process.kill(process.pid, "SIGINT");
|
|
9147
9151
|
setTimeout(() => process.exit(0), FORCE_EXIT_DELAY_MS).unref();
|
|
9148
9152
|
}
|
package/package.json
CHANGED
package/src/ui/app.tsx
CHANGED
|
@@ -335,8 +335,15 @@ export function App({ bridge, screen, themeTick = 0 }: AppProps) {
|
|
|
335
335
|
exiting.current = true
|
|
336
336
|
// Restore every terminal mode synchronously before signaling: on
|
|
337
337
|
// Windows the queued async writes of the dispose path can be lost
|
|
338
|
-
// at exit
|
|
338
|
+
// at exit, and the console input mode (raw/VT) persists for the
|
|
339
|
+
// next process attached to this console.
|
|
339
340
|
restoreAllModes()
|
|
341
|
+
try {
|
|
342
|
+
process.stdin.setRawMode(false)
|
|
343
|
+
process.stdin.pause()
|
|
344
|
+
} catch {
|
|
345
|
+
// stdin is not a TTY (piped input); there is no mode to restore.
|
|
346
|
+
}
|
|
340
347
|
process.kill(process.pid, 'SIGINT')
|
|
341
348
|
setTimeout(() => process.exit(0), FORCE_EXIT_DELAY_MS).unref()
|
|
342
349
|
}
|