authorgravatar for git@paperclover.netclover caruso <git@paperclover.net> 2026-03-28 18:06:21-07:00
committergravatar for git@paperclover.netclover caruso <git@paperclover.net> 2026-03-28 18:40:16-07:00
log799a06966ea7692c5fe5abb7b121d2bd541cbddf
tree92484c18f619b21879f78d44eb8d6d36ccc8b64a
parenta112bed705720e1c883d0c2a13e9175164544525
signature Signed by SSH key SHA256:xbd+BjjhyBfwk7GVoURf9Yx0gzDerHbvYv7SddNWmAs

fix(lib/progress): correct maxHeight calculation

resolves #97

2 files changed, 1 insertions(+), 2 deletions(-)

lib/log.test.ts-1
...@@ -522,7 +522,6 @@ describe("log widgets", () => {...@@ -522,7 +522,6 @@ describe("log widgets", () => {
522 ]),522 ]),
523 });523 });
524 host.cancel();524 host.cancel();
525 _?.stop();
526 });525 });
527526
528 test("writing during a render function is OK", () => {527 test("writing during a render function is OK", () => {
lib/progress.ts+1-1
...@@ -726,7 +726,7 @@ function renderChildren(state: ReadOnlyNode, now: number, depth: boolean[]) {...@@ -726,7 +726,7 @@ function renderChildren(state: ReadOnlyNode, now: number, depth: boolean[]) {
726 + " " + line + "\n";726 + " " + line + "\n";
727 }727 }
728 }728 }
729 maxHeight -= h + logLines.length;729 maxHeight -= h + string.countNewlines(logLines);
730 out += item;730 out += item;
731 }731 }
732 if (truncated) {732 if (truncated) {