Skip to content

fix: fully restore the terminal when ClearScreen is used - #1837

Open
andrinoff wants to merge 1 commit into
mainfrom
fix/improve-clearscreen
Open

andrinoff wants to merge 1 commit into
mainfrom
fix/improve-clearscreen

Conversation

@andrinoff

Copy link
Copy Markdown
Member

Something outside the renderer (a child process or another writer) can reset terminal modes, e.g. by emitting ESC[?1049l. The renderer still believes its alt-screen frame and modes are in place, so a redraw lands on the primary screen and mouse tracking, bracketed paste, focus reporting, keyboard enhancements, and cursor style stay lost.

Signed-off-by: drew <me@andrinoff.com>
@codecov

codecov Bot commented Oct 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 58.62069% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.88%. Comparing base (33f6a40) to head (b964df6).

Files with missing lines Patch % Lines
cursed_renderer.go 58.62% 7 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1837      +/-   ##
==========================================
+ Coverage   59.91%   60.88%   +0.97%     
==========================================
  Files          25       25              
  Lines        1342     1350       +8     
==========================================
+ Hits          804      822      +18     
+ Misses        449      443       -6     
+ Partials       89       85       -4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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