@zgeoff/atc 1.0.1 → 1.0.2
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/package.json +1 -1
- package/src/daemon/screen-model.ts +12 -3
package/package.json
CHANGED
|
@@ -84,10 +84,19 @@ export class ScreenModel {
|
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
// The terminal parses asynchronously
|
|
88
|
-
//
|
|
87
|
+
// The terminal parses asynchronously, and bytes recorded while a flush is
|
|
88
|
+
// awaited re-arm it — so the replay drains until no newer write is
|
|
89
|
+
// pending. Serializing earlier would omit bytes already streamed live to
|
|
90
|
+
// clients, and the replay's leading clear would erase them from the
|
|
91
|
+
// client's screen for good.
|
|
89
92
|
async renderReplay(): Promise<string> {
|
|
90
|
-
|
|
93
|
+
let pending: Promise<void>;
|
|
94
|
+
|
|
95
|
+
do {
|
|
96
|
+
pending = this.flushed;
|
|
97
|
+
|
|
98
|
+
await pending;
|
|
99
|
+
} while (pending !== this.flushed);
|
|
91
100
|
|
|
92
101
|
return RESET_INPUT_MODES + this.serializer.serialize() + this.renderInputModes();
|
|
93
102
|
}
|