Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix style resets #38

Merged
merged 1 commit into from
Feb 28, 2024
Merged

Fix style resets #38

merged 1 commit into from
Feb 28, 2024

Conversation

9999years
Copy link
Contributor

ansi-to-tui translates \x1b[0m as Style::default() and then updates the "running style" with style.patch, but style.patch(Style::default()) == style, so no change is made. This leads to subtle issues where colors and style modifiers are erroneously reintroduced after reset sequences.

This is simple to fix by translating \x1b[0m as Style::reset() instead.

9999years added a commit to MercuryTechnologies/ghciwatch that referenced this pull request Feb 27, 2024
9999years added a commit to MercuryTechnologies/ghciwatch that referenced this pull request Feb 27, 2024
@uttarayan21 uttarayan21 merged commit 5c458c9 into ratatui:master Feb 28, 2024
1 check passed
@uttarayan21
Copy link
Collaborator

Thank you for the PR

@9999years 9999years deleted the fix-reset branch February 28, 2024 18:08
9999years added a commit to MercuryTechnologies/ghciwatch that referenced this pull request Mar 1, 2024
9999years added a commit to MercuryTechnologies/ghciwatch that referenced this pull request Mar 1, 2024
9999years added a commit to MercuryTechnologies/ghciwatch that referenced this pull request Mar 1, 2024
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