Adjust pbox's margin based on length of prefix - #97
Merged
Conversation
Contributor
Author
|
Fixed by #98 |
WardBrian
force-pushed
the
pbox-adjust-margin-for-prefix
branch
from
August 5, 2026 14:48
83cc40c to
4e7f32e
Compare
johnyob
approved these changes
Aug 5, 2026
johnyob
left a comment
Owner
There was a problem hiding this comment.
lgtm 🚀
Thank you for your contribution 🙏
shonfeder
pushed a commit
to ocaml/opam-repository
that referenced
this pull request
Aug 6, 2026
CHANGES: - fix(renderer): adjust margin for messages near end of line ([johnyob/grace#97](johnyob/grace#97)) - fix(renderer): remove extra space in trailing labels ([johnyob/grace#98](johnyob/grace#98)) - fix(renderer): error recovery on invalid UTF-8 strings ([johnyob/grace#99](johnyob/grace#99))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Building on #96, this is a partial fix for #94.
The margin for pboxes is adjusted down based on the length of the prefix, meaning that text wraps in more expected ways when at the end of a long line.
It would, of course, be nice to also truncate the source line, which would also probably remove the need for the manual minimum width of 25.
Compare the test in this PR:
with
rustc: