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

Lazily detect background color setting #61

Merged
merged 1 commit into from Feb 4, 2022
Merged

Conversation

muesli
Copy link
Member

@muesli muesli commented Feb 4, 2022

This change prevents Lipgloss from querying the terminal's background color setting on init. Instead, the background color will get queried the first time the setting gets accessed by HasDarkBackground, and the result will be cached.

Furthermore SetHasDarkBackground(bool) has been added, which explicitly sets a value and avoids the automatic detection from ever being run.

This change prevents Lipgloss from querying the terminal's background
color setting on init. Instead, the background color will get queried
the first time the setting gets accessed by HasDarkBackground, and the
result will be cached.

Furthermore SetHasDarkBackground(bool) has been added, which explicitly
sets a value and avoids the automatic detection from ever being run.
@muesli muesli added the enhancement New feature or request label Feb 4, 2022
@muesli muesli merged commit b3934f5 into master Feb 4, 2022
@muesli muesli deleted the lazy-bgcolor-detection branch February 4, 2022 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant