Two bugs fixed: 1. Arrow keys detected as ESC: sys.stdin.read(1) uses Python's internal buffer, so after reading ESC byte, the remaining escape sequence bytes ([A for up-arrow) were in Python's buffer but not visible to select.select() on the OS fd. Switched to os.read(fd, 1) which reads directly from the file descriptor, bypassing Python's buffer. 2. Footer positioned wrong: draw_footer() counted buffer items to calculate padding, but a Rich Table renders as multiple lines. Added _line_count tracker with _add_line() and _add_lines(n) so footer padding is calculated from actual rendered line count. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
22 KiB
22 KiB