Severity: LOW Status: ✅ RESOLVED
historyLen() (#293 pattern).shiftDown caller-clears contract now documented on the function itself; changing ownership would require reworking scrollDown’s refcount release order — left as-is to avoid churn in refcount-sensitive code.| # | Site | Finding |
|---|---|---|
| a | grid.zig:262-265 |
shiftDown rotates the ring so the old bottom row becomes row 0 without clearing it; correctness depends on callers clearing immediately (screen.zig:1217-1221 does). Footgun API — clear inside or rename rotateDownAssumeTopDirty. |
| b | grid.zig:720 |
history.items.len - history_start raw subtraction where every other site uses guarded historyLen() (bug #293 pattern). |
| c | grid.zig:809-812 + 650-657 |
Post-reflow cursor can land on an is_padding half of a CJK pair; block cursor renders over blank half-cell (cosmetic). |
| d | grid.zig:291-315, 386-397 |
Per-line dirty flags are maintained everywhere but consumed by no renderer; insertLine/deleteLine move rows without marking them dirty — inert today, latent once line-level rendering lands. Dead machinery. |
| e | screen.zig:683-685 |
Combining marks over blank bases are discarded rather than attached; non-combining zero-width codepoints (ZWSP U+200B, variation selectors) dropped with no trace. Defensible but undocumented — Thai pipeline leans on this path. |
| f | screen.zig:1369-1399 |
RIS (resetHard) spares scrollback and tab stops (tmux clears everything); harmless at fixed tab width 8, latent if configurable. |
Also noted by the sweep (M1): with status off, bottom-row handling needs a
one-line fix so apps regain the last row.