Skip to content

Commit

Permalink
chore(examples): update and fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Feb 6, 2025
1 parent 69d85bd commit 2ef4961
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/cellbuf/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ func main() {
ansi.ResetHyperlink()
render := func() {
scr.Fill(cellbuf.NewCell('你'))
scr.PrintAt(x, y, text)
scr.PrintCropAt(x, y, text, "")
scr.Render()
scr.Flush()
}

resize := func(nw, nh int) {
Expand Down
3 changes: 2 additions & 1 deletion examples/layout/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,9 @@ func main() {
scr.Clear()
scr.SetContent(docStyle.Render(doc.String()))
box := cellbuf.Rect(dialogX, dialogY, dialogWidth, dialogHeight)
scr.SetContentRect(dialogBoxStyle.Render(dialogUI)+"\nabc", box)
scr.SetContentRect(dialogBoxStyle.Render(dialogUI), box)
scr.Render()
scr.Flush()
}

// First render
Expand Down

0 comments on commit 2ef4961

Please sign in to comment.