summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authordelthas <delthas@dille.cc>2022-10-14 11:19:42 +0200
committerdelthas <delthas@dille.cc>2022-10-14 11:19:42 +0200
commitd242b4f3e446a9950f007810b710bd240e4f623f (patch)
tree98d82da668a2c1f61d67e9a59ec6824c463ca5ed /ui
parentScroll to buffer on zoom (diff)
Switch to the upstream tcell implementation of OSC 8 hyperlink
tcell has merged OSC support in [1], with support for more terminals than what was added in the tcell fork we used. Now, all terminals with mouse sequences support should receive OSC 8 hyperlinks sequences. [1]: https://github.com/gdamore/tcell/pull/527/commits/e7b14a71dc78721c0f007fd6197262c52c1d4df9 Fixes: https://todo.sr.ht/~taiite/senpai/103
Diffstat (limited to 'ui')
-rw-r--r--ui/style.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/style.go b/ui/style.go
index 544cca5..cb24304 100644
--- a/ui/style.go
+++ b/ui/style.go
@@ -149,7 +149,7 @@ func (s StyledString) ParseURLs() StyledString {
}
if st.Start == ub {
// a style already starts at this position, edit it
- lastStyle.Style = lastStyle.Style.Hyperlink(link)
+ lastStyle.Style = lastStyle.Style.Url(link)
}
lastStyle = st
styles = append(styles, st)
@@ -158,7 +158,7 @@ func (s StyledString) ParseURLs() StyledString {
// no style existed at this position, add one from the last style
styles = append(styles, rangedStyle{
Start: ub,
- Style: lastStyle.Style.Hyperlink(link),
+ Style: lastStyle.Style.Url(link),
})
}
// find last style starting before or at url end
@@ -168,7 +168,7 @@ func (s StyledString) ParseURLs() StyledString {
break
}
if st.Start < ue {
- st.Style = st.Style.Hyperlink(link)
+ st.Style = st.Style.Url(link)
}
lastStyle = st
styles = append(styles, st)
@@ -177,7 +177,7 @@ func (s StyledString) ParseURLs() StyledString {
// no style existed at this position, add one from the last style without the hyperlink
styles = append(styles, rangedStyle{
Start: ue,
- Style: lastStyle.Style.Hyperlink(""),
+ Style: lastStyle.Style.Url(""),
})
}
}