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

Potentially broken word wrapping on main #333

Closed
TheLostLambda opened this issue Feb 1, 2024 · 3 comments · Fixed by #358
Closed

Potentially broken word wrapping on main #333

TheLostLambda opened this issue Feb 1, 2024 · 3 comments · Fixed by #358
Labels
bug Something isn't working

Comments

@TheLostLambda
Copy link
Contributor

Just a quick report, and I might have time to dig a bit deeper later on, but I've noticed a few times that I'll get some strange wrapping where the GraphicalReportHandler will move from the first to the second line, print exactly one word, then move to a third line.

I'm not particularly sure why yet, but it looks something like this:
image
Here, the is the lonely word that gets banished to that middle line, though I think I've seen this with a as well, so it seems like one-char words are enough to trigger this issue. Resizing the terminal a bit causes the problem to disappear or reappear, so perhaps there is some sort of off-by-one, or several levels of wrapping that don't communicate indentation properly?

Hard to say, but I've left it here in case anyone else has more time to look into it than I do!

@TheLostLambda
Copy link
Contributor Author

Oh, and as the title implies, this is using the current main branch of miette — I've not yet been able to check other versions!

@zkat
Copy link
Owner

zkat commented Feb 1, 2024

My guess: the wrapping for the nested diagnostic is not taking into account that it's getting nested, so it's using the column count of the parent.

@zkat zkat added the bug Something isn't working label Feb 1, 2024
@TheLostLambda
Copy link
Contributor Author

Just another note to myself or whoever picks this up (if they beat me to it!) — I've got a new contender for ugliest wrapping!

image

Those two #[related] errors there are causing some bonus trouble!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants