mirror of
https://github.com/charmbracelet/lipgloss.git
synced 2024-09-11 22:17:12 +03:00
fix: don't concurrently change output profiles
Multiple lipgloss renderer instances can end up using the same default termenv.Output. This leads to a race condition when manipulating the ColorProfile concurrently. We could mutex protect the standard output in termenv, but it feels like a weak promise, as the rest of the Output wouldn't (and probably shouldn't) get protected. Protecting it in lipgloss itself would require a global lock however. I can't come up with a proper use-case for this scenario, and therefore we shift this responsibility to the user.
This commit is contained in:
parent
776c15f0da
commit
a74950e6da
@ -58,8 +58,6 @@ func TestStyleRender(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestStyleCustomRender(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
r := NewRenderer(WithColorProfile(termenv.TrueColor), WithDarkBackground(false))
|
||||
tt := []struct {
|
||||
style Style
|
||||
|
Loading…
Reference in New Issue
Block a user