handleMouseFocus status-bar hit-testing doesn’t match the rendered status linehandleMouseFocus status-bar hit-testing doesn’t match the rendered status lineFile: src/server/server.zig:1678–1707
Severity: MEDIUM
Status: ✅ FIXED — buildLine now fills an optional out_ranges: ?*std.ArrayList(WindowRange) with each window entry’s exact rendered column span (the raw offsets are converted to absolute columns after renderWithCache), replacing the separate status.windowRanges() helper. buildStatusLine stores these into Server.status_click_ranges, status_click_row, and status_click_width; handleMouseFocus hit-tests against status_click_ranges only when status_enabled and y == status_click_row (the status row, session.height), and ignores clicks when the status bar is off. Regression tests (in src/status_click_test.zig): a status-bar click on window entry i selects that window, and a bottom-row click with status off is ignored.
The hit-test assumes a left prefix of [name] (3 + name.len) and per-window entries of #I:#W (1 + idx + 1 + name), ignoring base-index, window_flags, status-left-length truncation, and status-right. It also checks y == session.height, but the status row renders at dc.sy - 1 (render.zig:668), so on any display client larger than the smallest, status-bar clicks fail entirely; on smaller ones they can select the wrong window.