@duckmind/dm-darwin-x64 0.35.1 → 0.35.3
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/dm
CHANGED
|
Binary file
|
|
@@ -92,12 +92,25 @@ export function enableAlternateScrollMode(): string {
|
|
|
92
92
|
return "\x1b[?1007h";
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
const SYNCHRONIZED_OUTPUT_BEGIN = "\x1b[?2026h";
|
|
96
|
+
const SYNCHRONIZED_OUTPUT_END = "\x1b[?2026l";
|
|
97
|
+
|
|
95
98
|
export function beginSynchronizedOutput(): string {
|
|
96
|
-
return
|
|
99
|
+
return SYNCHRONIZED_OUTPUT_BEGIN;
|
|
97
100
|
}
|
|
98
101
|
|
|
99
102
|
export function endSynchronizedOutput(): string {
|
|
100
|
-
return
|
|
103
|
+
return SYNCHRONIZED_OUTPUT_END;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function stripSynchronizedOutputControls(data: string): string {
|
|
107
|
+
if (!data.includes(SYNCHRONIZED_OUTPUT_BEGIN) && !data.includes(SYNCHRONIZED_OUTPUT_END)) return data;
|
|
108
|
+
return data.split(SYNCHRONIZED_OUTPUT_BEGIN).join("").split(SYNCHRONIZED_OUTPUT_END).join("");
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function resetTextRenderingState(): string {
|
|
112
|
+
// Streamed tool output can leave SGR, OSC8, or DEC charset/SI-SO state active before the fixed input frame repaint.
|
|
113
|
+
return "\x1b[0m\x1b]8;;\x07\x0f\x1b%G\x1b(B\x1b)B\x1b*B\x1b+B";
|
|
101
114
|
}
|
|
102
115
|
|
|
103
116
|
export function setScrollRegion(top: number, bottom: number): string {
|
|
@@ -139,7 +152,7 @@ export function buildFixedEditorClusterPaint(
|
|
|
139
152
|
const safeRows = Math.max(1, Math.floor(terminalRows));
|
|
140
153
|
const safeWidth = Math.max(1, Math.floor(width));
|
|
141
154
|
const startRow = Math.max(1, safeRows - cluster.lines.length + 1);
|
|
142
|
-
let buffer = resetScrollRegion();
|
|
155
|
+
let buffer = resetScrollRegion() + resetTextRenderingState();
|
|
143
156
|
|
|
144
157
|
for (let index = 0; index < cluster.lines.length; index++) {
|
|
145
158
|
buffer += moveCursor(startRow + index, 1);
|
|
@@ -418,11 +431,12 @@ export class FixedBottomEditorCompositor {
|
|
|
418
431
|
|
|
419
432
|
const scrollBottom = Math.max(1, rawRows - cluster.lines.length);
|
|
420
433
|
const screenRow = this.getCurrentScreenRow(scrollBottom);
|
|
434
|
+
const scopedData = stripSynchronizedOutputControls(data);
|
|
421
435
|
this.writeOriginal(
|
|
422
436
|
beginSynchronizedOutput()
|
|
423
437
|
+ setScrollRegion(1, scrollBottom)
|
|
424
438
|
+ moveCursor(screenRow, 1)
|
|
425
|
-
+
|
|
439
|
+
+ scopedData
|
|
426
440
|
+ buildFixedEditorClusterPaint(this.decorateCluster(cluster), rawRows, width, this.getShowHardwareCursor())
|
|
427
441
|
+ endSynchronizedOutput(),
|
|
428
442
|
);
|