mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Add a helper function to do highlighting in a uniform way
This commit is contained in:
@@ -66,7 +66,7 @@ func (widget *Widget) contentFrom(builds *Builds) string {
|
||||
var str string
|
||||
for idx, build := range builds.Builds {
|
||||
|
||||
str += fmt.Sprintf(
|
||||
row := fmt.Sprintf(
|
||||
"[%s] [%s] %s-%s (%s) [%s]%s - [blue]%s\n",
|
||||
widget.RowColor(idx),
|
||||
buildColor(&build),
|
||||
@@ -77,6 +77,7 @@ func (widget *Widget) contentFrom(builds *Builds) string {
|
||||
strings.Split(build.Commit.Message, "\n")[0],
|
||||
build.CreatedBy.Login,
|
||||
)
|
||||
str += wtf.HighlightableHelper(widget.View, row, idx, len(build.Branch.Name))
|
||||
}
|
||||
|
||||
return str
|
||||
|
||||
Reference in New Issue
Block a user