From 799a06966ea7692c5fe5abb7b121d2bd541cbddf Mon Sep 17 00:00:00 2001 From: clover caruso Date: Sat, 28 Mar 2026 18:06:21 -0700 Subject: [PATCH] fix(lib/progress): correct maxHeight calculation resolves #97 --- lib/log.test.ts | 1 - lib/progress.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/log.test.ts b/lib/log.test.ts index 335ef1b5333addb27e6e39582cda2803a67b30df..b964a83f27abeb9460e5673b7e010bec53b064e8 100644 --- a/lib/log.test.ts +++ b/lib/log.test.ts @@ -522,7 +522,6 @@ describe("log widgets", () => { ]), }); host.cancel(); - _?.stop(); }); test("writing during a render function is OK", () => { diff --git a/lib/progress.ts b/lib/progress.ts index d82aeebd5146eca3b2479d8ad0e55583194a10e9..69823d0a1916c17bde8fdd140328641f59d064c6 100644 --- a/lib/progress.ts +++ b/lib/progress.ts @@ -726,7 +726,7 @@ function renderChildren(state: ReadOnlyNode, now: number, depth: boolean[]) { + " " + line + "\n"; } } - maxHeight -= h + logLines.length; + maxHeight -= h + string.countNewlines(logLines); out += item; } if (truncated) { -- 2.54.0