36b3af2e3d
PR Check / Code Quality: Format (push) Failing after 1s
PR Check / Code Quality: Lint (darwin) (push) Failing after 0s
PR Check / Code Quality: Lint (freebsd) (push) Failing after 1s
PR Check / Code Quality: Lint (windows) (push) Failing after 1s
PR Check / Code Quality: Lint (linux) (push) Failing after 1s
PR Check / Security: Vulnerability Scan (push) Failing after 0s
Update Documentation / update-docs (push) Failing after 2s
PR Check / Code Quality: Vendor (push) Failing after 1s
PR Check / Code Quality: Coverage (push) Failing after 0s
PR Check / Tests: Unit (macos-latest) (push) Has been cancelled
PR Check / Tests: Unit (ubuntu-24.04) (push) Has been cancelled
PR Check / Tests: Unit (ubuntu-24.04-arm) (push) Has been cancelled
PR Check / Tests: Unit (windows-latest) (push) Has been cancelled
23 lines
712 B
Go
23 lines
712 B
Go
package tea
|
|
|
|
import (
|
|
"github.com/charmbracelet/lipgloss"
|
|
)
|
|
|
|
func init() {
|
|
// XXX: This is a workaround to make assure that Lip Gloss and Termenv
|
|
// query the terminal before any Bubble Tea Program runs and acquires the
|
|
// terminal. Without this, Programs that use Lip Gloss/Termenv might hang
|
|
// while waiting for a a [termenv.OSCTimeout] while querying the terminal
|
|
// for its background/foreground colors.
|
|
//
|
|
// This happens because Bubble Tea acquires the terminal before termenv
|
|
// reads any responses.
|
|
//
|
|
// Note that this will only affect programs running on the default IO i.e.
|
|
// [os.Stdout] and [os.Stdin].
|
|
//
|
|
// This workaround will be removed in v2.
|
|
_ = lipgloss.HasDarkBackground()
|
|
}
|