mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-05 00:59:19 +02:00
build: bump gocui
This commit is contained in:
21
vendor/github.com/gdamore/tcell/v2/style.go
generated
vendored
21
vendor/github.com/gdamore/tcell/v2/style.go
generated
vendored
@ -27,6 +27,7 @@ type Style struct {
|
||||
bg Color
|
||||
attrs AttrMask
|
||||
url string
|
||||
urlId string
|
||||
}
|
||||
|
||||
// StyleDefault represents a default style, based upon the context.
|
||||
@ -44,6 +45,7 @@ func (s Style) Foreground(c Color) Style {
|
||||
bg: s.bg,
|
||||
attrs: s.attrs,
|
||||
url: s.url,
|
||||
urlId: s.urlId,
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,6 +57,7 @@ func (s Style) Background(c Color) Style {
|
||||
bg: c,
|
||||
attrs: s.attrs,
|
||||
url: s.url,
|
||||
urlId: s.urlId,
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,6 +74,7 @@ func (s Style) setAttrs(attrs AttrMask, on bool) Style {
|
||||
bg: s.bg,
|
||||
attrs: s.attrs | attrs,
|
||||
url: s.url,
|
||||
urlId: s.urlId,
|
||||
}
|
||||
}
|
||||
return Style{
|
||||
@ -78,6 +82,7 @@ func (s Style) setAttrs(attrs AttrMask, on bool) Style {
|
||||
bg: s.bg,
|
||||
attrs: s.attrs &^ attrs,
|
||||
url: s.url,
|
||||
urlId: s.urlId,
|
||||
}
|
||||
}
|
||||
|
||||
@ -139,6 +144,7 @@ func (s Style) Attributes(attrs AttrMask) Style {
|
||||
bg: s.bg,
|
||||
attrs: attrs,
|
||||
url: s.url,
|
||||
urlId: s.urlId,
|
||||
}
|
||||
}
|
||||
|
||||
@ -151,5 +157,20 @@ func (s Style) Url(url string) Style {
|
||||
bg: s.bg,
|
||||
attrs: s.attrs,
|
||||
url: url,
|
||||
urlId: s.urlId,
|
||||
}
|
||||
}
|
||||
|
||||
// UrlId returns a style with the UrlId set. If the provided UrlId is not empty,
|
||||
// any marked up Url with this style will be given the UrlId also. If the
|
||||
// terminal supports it, any text with the same UrlId will be grouped as if it
|
||||
// were one Url, even if it spans multiple lines.
|
||||
func (s Style) UrlId(id string) Style {
|
||||
return Style{
|
||||
fg: s.fg,
|
||||
bg: s.bg,
|
||||
attrs: s.attrs,
|
||||
url: s.url,
|
||||
urlId: "id=" + id,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user