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 (hx --health): Don't print headers in white #12355

Merged
merged 2 commits into from
Dec 29, 2024

Conversation

jeanas
Copy link
Contributor

@jeanas jeanas commented Dec 28, 2024

If the terminal has a white background, this makes them invisible.

fixes #5516

@jeanas
Copy link
Contributor Author

jeanas commented Dec 28, 2024

Alright, I've improved this to print the table headers in bold so they still have some kind of visual highlighting.

If the terminal has a white background, this makes them invisible.
Make them bold instead.

Fixes helix-editor#5516

// We can't directly use println!() because of
// https://github.com/crossterm-rs/crossterm/issues/589
let _ = crossterm::execute!(std::io::stdout(), Print(data));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to reviewers: this workaround was not actually necessary (as can be verified by changing this line to write!(std::io::stdout(), "{}", data);). The linked crossterm issue is about the Display implementation of crossterm types, which is not relevant because the format! call works on strings and styling is added later. This was probably an artifact of refactoring.

@jeanas
Copy link
Contributor Author

jeanas commented Dec 29, 2024

Before this PR:

image

In a light terminal:

image

After PR:

image

image

Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@the-mikedavis the-mikedavis merged commit 9cc056e into helix-editor:master Dec 29, 2024
6 checks passed
@jeanas jeanas deleted the fix-white branch December 29, 2024 16:44
medzernik added a commit to medzernik/helix that referenced this pull request Dec 29, 2024
fix (hx --health): Don't print headers in white (helix-editor#12355)
medzernik added a commit to medzernik/helix that referenced this pull request Dec 29, 2024
medzernik added a commit to medzernik/helix that referenced this pull request Dec 29, 2024
Revert "fix (hx --health): Don't print headers in white (helix-editor#12355)"
medzernik pushed a commit to medzernik/helix that referenced this pull request Dec 29, 2024
julianbieber pushed a commit to julianbieber/helix that referenced this pull request Dec 29, 2024
CedricMeu pushed a commit to CedricMeu/helix that referenced this pull request Jan 2, 2025
akhenakh pushed a commit to akhenakh/helix that referenced this pull request Jan 4, 2025
GladkihEgor pushed a commit to GladkihEgor/helix that referenced this pull request Jan 4, 2025
Desdaemon pushed a commit to Desdaemon/helix that referenced this pull request Jan 6, 2025
diucicd pushed a commit to diucicd/helix that referenced this pull request Jan 8, 2025
julianbieber pushed a commit to julianbieber/helix that referenced this pull request Jan 15, 2025
rmburg pushed a commit to rmburg/helix that referenced this pull request Jan 20, 2025
julianbieber pushed a commit to julianbieber/helix that referenced this pull request Jan 20, 2025
julianbieber pushed a commit to julianbieber/helix that referenced this pull request Jan 28, 2025
julianbieber pushed a commit to julianbieber/helix that referenced this pull request Feb 19, 2025
julianbieber pushed a commit to julianbieber/helix that referenced this pull request Feb 25, 2025
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.

Column heading of hx --health languages invisible on light terminal theme
3 participants