@oh-my-pi/pi-tui 3.3.1337 → 3.4.1337

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/terminal.ts +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oh-my-pi/pi-tui",
3
- "version": "3.3.1337",
3
+ "version": "3.4.1337",
4
4
  "description": "Terminal User Interface library with differential rendering for efficient text-based applications",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
package/src/terminal.ts CHANGED
@@ -10,10 +10,10 @@ let activeTerminal: ProcessTerminal | null = null;
10
10
  * Resets terminal state without requiring access to the ProcessTerminal instance
11
11
  */
12
12
  export function emergencyTerminalRestore(): void {
13
- if (activeTerminal) {
14
- activeTerminal.stop();
15
- activeTerminal.showCursor();
16
- activeTerminal = null;
13
+ const terminal = activeTerminal;
14
+ if (terminal) {
15
+ terminal.stop();
16
+ terminal.showCursor();
17
17
  } else {
18
18
  // Blind restore if no instance tracked - covers edge cases
19
19
  process.stdout.write(