fix: fixed-frame per-line \x1b[2K redraw + blank separators for six-item breathing room (v1.29.23) The earlier full-screen / six-slot list worked around the redraw bug by making the frame always maximal so the missing clear never showed. The redraw itself was still wrong: \x1b[H\x1b[J clear-screen at the top of every render meant a shorter new frame left remnants of a longer old one and vice versa. Replace it with a deterministic fixed-size frame that clears and rewrites every line individually. render() now emits a frame of exactly term_rows lines: topbar (1) + body (term_rows - 2, padded) + statusbar (1, no trailing \n). Each line is prefixed with \x1b[2K before its content is written. A new line never inherits the previous line's tail; an old longer line is gone by construction. The cursor parks at the end of the statusbar so the next redraw starts from a known position. buildListLines now emits 4N - 1 lines for N slots: every slot is 3 lines (header, message, meta-or-blank) and slots are separated by a single blank line. The dash separator is gone -- the loudest single contributor to the wall-of-text feel. Non-selected slots gain a blank third line for an internal header/message/gap rhythm. Empty trailing slots are 3 blank lines so the per-slot structure stays uniform and the body's pad-to-body_rows stays trivial. historyVisibleSlots is now @min(6, (body_rows + 1) / 4) so the body row budget matches the new 4-line-per-slot cost: 6 items at body_rows >= 23, graceful degradation below that. Removed: appendBlankLine, historyListBodyRows, renderTopbar, renderStatusbar, dashLine. Added: writeLine, writeEmptyLine, writeLastLine, buildTopbarLine, buildStatusbarLine. Session 1's SA.RESTART resize fix (v1.29.22) is intact -- the 02- history resize regression re-passes, and the resize-from session 2 output above shows the new frame model rendering correctly at 40x120, 30x100, 50x120, and 24x80 without remnants or scrolling.
$ koh steal kepr.uk/koh@62c1a13e8ea5
·
parent: caef217326ec
discussion
log in to leave a comment.