szn

Bug 309 — status line built from scratch every render

309. buildStatusLine re-expands templates every render instead of caching

File: src/server/server.zig:2788-2790 Severity: LOW Status: ✅ FIXED

buildStatusLine is called every render when status is enabled. It re-expands status-left, status-right, and window-status-format templates from scratch each time.

While TemplateCache exists in format.zig, buildStatusLine still creates a new Context and re-expands everything.

Fix: Cache the expanded status line on the Server struct with a generation counter. Only rebuild when options change, window list changes, or a timer fires (status-interval). The existing status-interval option already tracks timer-based updates — reuse that mechanism.