Set correct term profile

pull/295/head
Anton Medvedev 2 months ago
parent 7faa3d2895
commit c36c6ae17d
No known key found for this signature in database

@ -22,7 +22,6 @@ import (
"github.com/charmbracelet/lipgloss"
"github.com/goccy/go-yaml"
"github.com/mattn/go-isatty"
"github.com/muesli/termenv"
"github.com/sahilm/fuzzy"
jsonpath "github.com/antonmedv/fx/path"
@ -162,8 +161,7 @@ func main() {
search: newSearch(),
}
output := termenv.NewOutput(os.Stderr)
lipgloss.SetColorProfile(output.ColorProfile())
lipgloss.SetColorProfile(termOutput.ColorProfile())
p := tea.NewProgram(m,
tea.WithAltScreen(),

@ -50,6 +50,10 @@ func valueStyle(b []byte, selected, chunk bool) color {
}
}
var (
termOutput = termenv.NewOutput(os.Stderr)
)
func init() {
themeNames = make([]string, 0, len(themes))
for name := range themes {
@ -68,7 +72,7 @@ func init() {
os.Exit(1)
}
if termenv.ColorProfile() == termenv.Ascii {
if termOutput.ColorProfile() == termenv.Ascii {
currentTheme = themes["0"]
}

Loading…
Cancel
Save