Skip to content

Commit

Permalink
fix(examples): cellbuf: make sure we reset the link after the text
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Feb 5, 2025
1 parent 11d50d2 commit dbe065c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/cellbuf/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ func main() {

x, y := (w/2)-10, h/2

text := ansi.SetHyperlink("https://charm.sh") +
ansi.Style{}.Reverse().Styled(" !Hello, world! ") +
ansi.ResetHyperlink()
render := func() {
scr.Fill(nil)
scr.Fill(cellbuf.NewCell('你'))
text := ansi.SetHyperlink("https://charm.sh") +
ansi.Style{}.Reverse().Styled(" !Hello, world! ")
scr.PrintAt(x, y, text)
scr.Render()
}
Expand Down

0 comments on commit dbe065c

Please sign in to comment.