(drawlist: Uint8Array, rows: number)
| 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"); |
nothing calls this directly
no test coverage detected