Skip to content

Commit

Permalink
fixup! fixup! fix first lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
raphamorim committed Feb 21, 2025
1 parent 80a8d62 commit 188c6e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion examples/cellbuf/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ func main() {
text := ansi.SetHyperlink("https://charm.sh") +
ansi.Style{}.Reverse().Styled(" !Hello, world! ") +
ansi.ResetHyperlink()
scrw := cellbuf.NewScreenWriter(scr)
render := func() {
scr.Fill(cellbuf.NewCell('你'))
scr.PrintCropAt(x, y, text, "")
scrw.PrintCropAt(x, y, text, "")
scr.Render()
scr.Flush()
}
Expand Down
5 changes: 3 additions & 2 deletions examples/layout/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,11 +407,12 @@ func main() {
dialogWidth := lipgloss.Width(dialogUI) + dialogBoxStyle.GetHorizontalFrameSize()
dialogHeight := lipgloss.Height(dialogUI) + dialogBoxStyle.GetVerticalFrameSize()
dialogX, dialogY := physicalWidth/2-dialogWidth/2-docStyle.GetVerticalFrameSize()-1, 12
scrw := cellbuf.NewScreenWriter(scr)
render := func() {
scr.Clear()
scr.SetContent(docStyle.Render(doc.String()))
scrw.SetContent(docStyle.Render(doc.String()))
box := cellbuf.Rect(dialogX, dialogY, dialogWidth, dialogHeight)
scr.FillRect(dialogBoxStyle.Render(dialogUI), box)
scrw.FillRect(dialogBoxStyle.Render(dialogUI), box)
scr.Render()
scr.Flush()
}
Expand Down

0 comments on commit 188c6e3

Please sign in to comment.