diff --git a/modules/hackernews/widget.go b/modules/hackernews/widget.go index 44a15328..9131f88d 100644 --- a/modules/hackernews/widget.go +++ b/modules/hackernews/widget.go @@ -97,13 +97,14 @@ func (widget *Widget) Render() { func (widget *Widget) contentFrom(stories []Story) string { var str string for idx, story := range stories { + u, _ := url.Parse(story.URL) + str = str + fmt.Sprintf( - `["%d"][""][%s] [yellow]%d. [%s]%s [blue](%s)[""]`, + `["%d"][""][%s]%2d. %s [lightblue](%s)[white][""]`, idx, widget.RowColor(idx), idx+1, - widget.RowColor(idx), story.Title, strings.TrimPrefix(u.Host, "www."), ) diff --git a/wtf/scrollable.go b/wtf/scrollable.go index a81e0277..fe716a32 100644 --- a/wtf/scrollable.go +++ b/wtf/scrollable.go @@ -41,7 +41,7 @@ func (widget *ScrollableWidget) GetSelected() int { func (widget *ScrollableWidget) RowColor(idx int) string { if widget.View.HasFocus() && (idx == widget.selected) { - widget.CommonSettings.DefaultFocussedRowColor() + return widget.CommonSettings.DefaultFocussedRowColor() } return widget.CommonSettings.RowColor(idx)