Skip to content

Fix overlapping text in wide terminals - #2

Open
sj26 wants to merge 1 commit into
wasim:mainfrom
sj26:fix/wide-terminal-rendering
Open

Fix overlapping text in wide terminals#2
sj26 wants to merge 1 commit into
wasim:mainfrom
sj26:fix/wide-terminal-rendering

Conversation

@sj26

@sj26 sj26 commented Aug 28, 2026

Copy link
Copy Markdown

Why

When interactive playback advances between paragraphs, the terminal renderer moves up from the status line but keeps its horizontal cursor position. It then clears and rewrites the completed paragraph from that offset, leaving the old text on the left and producing duplicated, overlapping output—especially visibly in wide terminals.

image

What

Return the cursor to column zero before clearing and committing the completed paragraph. Add a focused regression test for the emitted cursor sequence so future changes cannot reintroduce the offset rendering.

Validation:

  • .venv/bin/python -m unittest discover -s tests -v — 1 test passed
  • .venv/bin/python -m py_compile aloud.py tests/test_terminal_rendering.py — passed
  • git diff --check origin/main...HEAD — passed
  • PTY + terminal-emulator reproduction at 80 and 240 columns: baseline rendered the committed heading twice at both widths; fixed branch rendered it once with the next paragraph in a clean region.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants