Description
If a hyperlink is long enough to wrap onto a second line, the part on the second line is not clickable, it seems TerminalRenderer writes the second row's text without a proper OSC8 open sequence?
In terminal_renderer.go, updatePen() calls ResetHyperlink(), but I noticed it doesn't seem to clear s.cur.Link like the Style branch above it does, could that be the problem?
func (s *TerminalRenderer) updatePen(cell *Cell) {
if cell == nil {
if !s.cur.Style.IsZero() {
_, _ = s.buf.WriteString(ansi.ResetStyle)
s.cur.Style = Style{} // Reset style
}
if !s.cur.Link.IsZero() {
_, _ = s.buf.WriteString(ansi.ResetHyperlink())
// should this do the same reset for the link?
// for example s.cur.Link = Link{} ?
}
return
}
I found this when working on a Bubble Tea v2 app, where lipgloss was wrapping hyperlinked label over two lines, for now I'm working around it by giving each line's link a different OSC8 ID, which makes the renderer treat it as a new link, but it would be nice for it to be handled upstream if it is indeed a bug?
Thanks! :)
Version
v0.0.0-20260811164956-006e29f97886
Environment
No response
Description
If a hyperlink is long enough to wrap onto a second line, the part on the second line is not clickable, it seems TerminalRenderer writes the second row's text without a proper OSC8 open sequence?
In
terminal_renderer.go,updatePen()callsResetHyperlink(), but I noticed it doesn't seem to clears.cur.Linklike the Style branch above it does, could that be the problem?I found this when working on a Bubble Tea v2 app, where lipgloss was wrapping hyperlinked label over two lines, for now I'm working around it by giving each line's link a different OSC8 ID, which makes the renderer treat it as a new link, but it would be nice for it to be handled upstream if it is indeed a bug?
Thanks! :)
Version
v0.0.0-20260811164956-006e29f97886
Environment
No response