Skip to content

fix: clear terminal on resize so shrink+grow can't leave stale rows - #17

Merged
abosnjakovic merged 1 commit into
mainfrom
fix-resize-garble
Aug 15, 2026
Merged

fix: clear terminal on resize so shrink+grow can't leave stale rows#17
abosnjakovic merged 1 commit into
mainfrom
fix-resize-garble

Conversation

@abosnjakovic

Copy link
Copy Markdown
Owner

A resize that lands back on the previous size within one tick (herdr flips 69->34->69 rows in ~400ms) is invisible to ratatui's autoresize, but the emulator has already scrolled the alternate screen. Diff-only redraws then accumulate stale rows.

Handle Event::Resize explicitly: mark needs_clear, main loop clears before next draw. Reproduced and verified in tmux with rapid resize-window -y 34 / -y 69.

🤖 Generated with Claude Code

A resize that lands back on the previous size within one tick (herdr
flips 69->34->69 rows in ~400ms) is invisible to ratatui's autoresize,
but the emulator has already scrolled the alternate screen. Diff-only
redraws then accumulate stale rows. Handle Event::Resize explicitly:
mark needs_clear, and have the main loop clear before the next draw.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@abosnjakovic
abosnjakovic merged commit 7ee89b7 into main Aug 15, 2026
1 check passed
@abosnjakovic
abosnjakovic deleted the fix-resize-garble branch August 15, 2026 07:38
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.

1 participant