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

cargo: Revert version update on ansi-to-tui #702

Merged

Conversation

har7an
Copy link
Contributor

@har7an har7an commented Mar 25, 2024

which apparently causes custom styling to be lost on the currently selected line.

I noticed that the last version increase contained a bunch of dependency updates (#700). One of the updated dependencies was ansi-to-tui, which had a major version increase from 3 to 4. Unfortunately their Changelog isn't up to date, but in the Git history I found this commit which, as far as I can tell, changes the handling of the reset ANSI code, probably justifying the major version increase.

Before the update (or with this patch applied), my active line looks like this:

image

whereas with the current version, I get this:

image

As far as I can tell this change was introduced in 9db8b2c, but at a quick glance I don't see an immediate connection between the code added there and the theming issues I experience now (apart from the version bump in ansi-to-tui). Maybe the code needs to be patched, or the theming in my config is broken? In any case, this PR "fixes" the issue for me.

which causes custom styling to be lost on the currently selected line.
@sayanarijit
Copy link
Owner

Thanks for the PR. We might be doing something wrong. I think it's better to fix the actual issue rather than pinning the dependency, since the related breaking change is supposed to be a fix, than a bug.

@sayanarijit
Copy link
Owner

It's hard to argue what should be the ideal case. Digging deeper, the whole Reset implementation in ratatui feels a bit weird. It's considered as a "color", and not a modifier, but I think it should be its own unique category (neither color, nor modifier). Let's merge this for now as a practical workaround, but maybe creating a discussion (maybe in ratatui) would be a better long term solution.

@sayanarijit sayanarijit merged commit d5217f6 into sayanarijit:dev Mar 26, 2024
10 checks passed
@har7an har7an deleted the fix/restore-styling-for-selection branch March 26, 2024 06:26
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