Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lazily detect background color setting
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.
- Loading branch information
Showing
1 changed file
with
29 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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