Open jkellogg01 opened 3 months ago
this also might have something to do with the use of lipgloss.JoinVertical
; when I removed it from my reproduction the colors were rendered correctly:
package main
import (
"fmt"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/lipgloss/list"
)
func main() {
l := list.New(
"dotstash",
"other-config",
).Enumerator(func(items list.Items, index int) string { return "" }).
ItemStyleFunc(func(items list.Items, index int) lipgloss.Style {
def := lipgloss.NewStyle().
Padding(0, 1).MarginBottom(1).Border(lipgloss.NormalBorder(), false, false, false, true)
if index == 0 {
highlight := lipgloss.Color("#F780E2")
return def.Foreground(highlight).BorderForeground(highlight)
}
return def
})
fmt.Println(l)
}
Describe the bug freeze appears to be changing the colors of captured terminal output and I'm not sure why.
Reproduction Here is a minimal reproduction of the issue I'm experiencing:
When the program is run, the first element will be entirely pink, but when the output is captured by freeze using the
-x
flag, the left border will remain pink, while the text will have the color removed.Expected behavior Commands that output color that is normally entirely colored are instead stripped of their color when the output is captured using
freeze -x <command>
Screenshots
first screenshot is captured output from the program I'm working on, second is captured output from the reproduction program above.
Desktop (please complete the following information):