MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / commitScrollback

Function commitScrollback

packages/node/src/backend/nodeBackend.ts:879–894  ·  view source on GitHub ↗
(drawlist: Uint8Array, rows: number)

Source from the content-addressed store, hash-verified

877 },
878
879 async commitScrollback(drawlist: Uint8Array, rows: number): Promise<void> {
880 if (disposed) throw new Error("NodeBackend: disposed");
881 if (fatal !== null) throw fatal;
882 if (!started || worker === null) throw new Error("NodeBackend: not started");
883 if (stopRequested) throw new Error("NodeBackend: stopped");
884 if (!isInlineScreen) {
885 throw new ZrUiError("ZRUI_BACKEND_ERROR", 'commitScrollback requires screen.mode "inline"');
886 }
887 validateInlineRowsOrThrow(rows, "commitScrollback: rows");
888 const buf = new ArrayBuffer(drawlist.byteLength);
889 copyInto(buf, drawlist);
890 const d = deferred<void>();
891 commitWaiters.push(d);
892 send({ type: "commitScrollback", bytes: buf, byteLen: drawlist.byteLength, rows }, [buf]);
893 return d.promise;
894 },
895
896 async setInlineRows(rows: number): Promise<void> {
897 if (disposed) throw new Error("NodeBackend: disposed");

Callers

nothing calls this directly

Calls 5

copyIntoFunction · 0.85
sendFunction · 0.85
deferredFunction · 0.50
pushMethod · 0.45

Tested by

no test coverage detected