Skip to content

Commit

Permalink
fix: don't use lipgloss deprecated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
jippi committed Jun 5, 2024
1 parent 1280c12 commit 9d36d9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/tui/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func (p Printer) Box(header string, bodies ...string) {
body := strings.Join(bodies, " ")

// Copy the box styles to avoid leaking changes to the styles
headerStyle, bodyStyle := p.boxHeaderStyle.Copy(), p.boxBodyStyle.Copy()
headerStyle, bodyStyle := p.boxHeaderStyle, p.boxBodyStyle

// If there are no body, just render the header box directly
if len(body) == 0 {
Expand Down Expand Up @@ -232,7 +232,7 @@ func (p Printer) Copy(options ...PrinterOption) Printer {

// TextStyle returns a *copy* of the current [lipgloss.Style]
func (p Printer) Style() lipgloss.Style {
return p.textStyle.Copy()
return p.textStyle

Check warning on line 235 in pkg/tui/printer.go

View check run for this annotation

Codecov / codecov/patch

pkg/tui/printer.go#L235

Added line #L235 was not covered by tests
}

// ApplyTextStyle returns a new copy of [StylePrint] instance with the [Style] based on the callback changes
Expand Down

0 comments on commit 9d36d9e

Please sign in to comment.