@oh-my-pi/pi-tui 15.9.0 → 15.9.1
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/CHANGELOG.md +5 -0
- package/package.json +3 -3
- package/src/terminal.ts +13 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [15.9.1] - 2026-06-04
|
|
6
|
+
### Fixed
|
|
7
|
+
|
|
8
|
+
- Fixed the OSC 11 appearance poll re-querying every 2s forever on terminals that support Mode 2031 but never change theme, whose repeated OSC 11/DA1 writes cleared the user's active text selection (breaking copy every 2 seconds). The poll now stops as soon as DECRQM confirms Mode 2031 support, since push notifications make polling redundant.
|
|
9
|
+
|
|
5
10
|
## [15.9.0] - 2026-06-04
|
|
6
11
|
|
|
7
12
|
### Added
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-tui",
|
|
4
|
-
"version": "15.9.
|
|
4
|
+
"version": "15.9.1",
|
|
5
5
|
"description": "Terminal User Interface library with differential rendering for efficient text-based applications",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"fmt": "biome format --write ."
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@oh-my-pi/pi-natives": "15.9.
|
|
41
|
-
"@oh-my-pi/pi-utils": "15.9.
|
|
40
|
+
"@oh-my-pi/pi-natives": "15.9.1",
|
|
41
|
+
"@oh-my-pi/pi-utils": "15.9.1",
|
|
42
42
|
"lru-cache": "11.5.1",
|
|
43
43
|
"marked": "^18.0.4"
|
|
44
44
|
},
|
package/src/terminal.ts
CHANGED
|
@@ -281,7 +281,11 @@ export class ProcessTerminal implements Terminal {
|
|
|
281
281
|
this.#safeWrite("\x1b[?2031h");
|
|
282
282
|
|
|
283
283
|
// Start periodic OSC 11 re-query for terminals without Mode 2031
|
|
284
|
-
// (Warp, Alacritty, WezTerm
|
|
284
|
+
// (Warp, Alacritty, older WezTerm). Stops once Mode 2031 support is
|
|
285
|
+
// confirmed via DECRQM (probed below) or a Mode 2031 change notification
|
|
286
|
+
// fires — push notifications supersede polling, and the poll's repeated
|
|
287
|
+
// OSC 11/DA1 writes clear the user's active text selection on some
|
|
288
|
+
// terminals (copy breaks every 2s).
|
|
285
289
|
// Windows Terminal under WSL has been observed to close the hosting tab
|
|
286
290
|
// after repeated OSC 11/DA1 probes. Keep the initial/event-driven probes,
|
|
287
291
|
// but avoid background polling there.
|
|
@@ -291,11 +295,14 @@ export class ProcessTerminal implements Terminal {
|
|
|
291
295
|
|
|
292
296
|
// Probe DEC private-mode support via DECRQM. 2026 (synchronized output)
|
|
293
297
|
// gates the renderer's begin/end markers; 2048 (in-band resize) is enabled
|
|
294
|
-
// only after the terminal confirms support
|
|
298
|
+
// only after the terminal confirms support; 2031 (appearance change
|
|
299
|
+
// notifications) stops the OSC 11 poll once confirmed, since push
|
|
300
|
+
// notifications make polling redundant. Each probe rides the shared DA1
|
|
295
301
|
// sentinel FIFO, so a terminal that ignores DECRQM still resolves (as
|
|
296
302
|
// unsupported) when the DA1 reply arrives.
|
|
297
303
|
this.#queryPrivateMode(2026);
|
|
298
304
|
this.#queryPrivateMode(2048);
|
|
305
|
+
this.#queryPrivateMode(2031);
|
|
299
306
|
}
|
|
300
307
|
|
|
301
308
|
/**
|
|
@@ -785,7 +792,9 @@ export class ProcessTerminal implements Terminal {
|
|
|
785
792
|
/**
|
|
786
793
|
* Record DECRQM support for a private mode (idempotent — first result wins)
|
|
787
794
|
* and notify subscribers. Enables DEC 2048 in-band resize when 2048 resolves
|
|
788
|
-
* supported
|
|
795
|
+
* supported, and stops the OSC 11 poll when 2031 resolves supported (Mode 2031
|
|
796
|
+
* push notifications make periodic re-querying redundant — and the poll's
|
|
797
|
+
* OSC 11/DA1 writes clobber active text selections on some terminals).
|
|
789
798
|
*/
|
|
790
799
|
#resolvePrivateMode(mode: number, supported: boolean): void {
|
|
791
800
|
if (this.#privateModeSupport.has(mode)) return;
|
|
@@ -798,6 +807,7 @@ export class ProcessTerminal implements Terminal {
|
|
|
798
807
|
}
|
|
799
808
|
}
|
|
800
809
|
if (mode === 2048 && supported) this.#enableInBandResize();
|
|
810
|
+
if (mode === 2031 && supported) this.#stopOsc11Poll();
|
|
801
811
|
}
|
|
802
812
|
|
|
803
813
|
/**
|