Skip to content

Commit 70c6e3c

Browse files
author
Yogthos
committed
fix: pre-existing renderer regression tests terminal-size independent
The two scroll-anchor regression tests used fresh_with_lines(50) which didn't work on terminals taller than ~56 rows (visible_lines > 50). On such terminals max_offset = total - visible = 0, so scroll_line_up is a no-op — the test's scroll_offset never changed and assertions failed with 'left: 1, right: 0' or 'left: 3, right: 133'. Fix: fresh_with_lines_scrollable(n, margin) pads the buffer to at least visible_lines + margin lines so scrolling always has room regardless of terminal height. The replace_from test now uses buffer- relative indices instead of hardcoded '40' since the buffer size varies. Also cleaned up debug eprintln left in from earlier investigation.
1 parent bc552df commit 70c6e3c

6 files changed

Lines changed: 193 additions & 851 deletions

File tree

0 commit comments

Comments
 (0)