Handle terminal resize dynamically

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
rolandnsharp
2026-04-05 19:59:01 +10:00
parent bec41a437e
commit 1f320b7ff1
2 changed files with 13 additions and 2 deletions

View File

@@ -39,6 +39,10 @@ proc initScope*(w, h: int): Scope =
proc w*(s: Scope): int = s.phosphor.w
proc h*(s: Scope): int = s.phosphor.h
proc resize*(scope: var Scope, w, h: int) =
if w == scope.w and h == scope.h: return
scope.phosphor = initPhosphor(w, h)
# ── Trace rendering ──────────────────────────────────────────────────
proc renderTrace*(scope: var Scope) =