(drawlist: Uint8Array, rows: number)
| 781 | }, |
| 782 | |
| 783 | async commitScrollback(drawlist: Uint8Array, rows: number): Promise<void> { |
| 784 | if (disposed) throw new Error("NodeBackend(inline): disposed"); |
| 785 | if (fatal !== null) throw fatal; |
| 786 | if (!started || engineId === null || native === null) |
| 787 | throw new Error("NodeBackend(inline): not started"); |
| 788 | if (stopRequested) throw new Error("NodeBackend(inline): stopped"); |
| 789 | if (!isInlineScreen) { |
| 790 | throw new ZrUiError("ZRUI_BACKEND_ERROR", 'commitScrollback requires screen.mode "inline"'); |
| 791 | } |
| 792 | validateInlineRowsOrThrow(rows, "commitScrollback: rows"); |
| 793 | const commit = native.engineCommitScrollback; |
| 794 | if (commit === undefined) { |
| 795 | throw new ZrUiError( |
| 796 | "ZRUI_BACKEND_ERROR", |
| 797 | "commitScrollback: native addon lacks engineCommitScrollback", |
| 798 | ); |
| 799 | } |
| 800 | const rc = commit(engineId, drawlist, rows); |
| 801 | if (rc < 0) { |
| 802 | throw new ZrUiError( |
| 803 | "ZRUI_BACKEND_ERROR", |
| 804 | `engine_commit_scrollback failed: code=${String(rc)}`, |
| 805 | ); |
| 806 | } |
| 807 | }, |
| 808 | |
| 809 | async setInlineRows(rows: number): Promise<void> { |
| 810 | if (disposed) throw new Error("NodeBackend(inline): disposed"); |
nothing calls this directly
no test coverage detected