From a5f98c138a45c0f9fea01af7005dc07d371077ea Mon Sep 17 00:00:00 2001 From: Sean Smith Date: Thu, 9 May 2019 10:59:04 -0400 Subject: [PATCH] Move closing region tag to the end of the line Highlight works by highlighting the entire region that exists Since current region starts and immediately ends, there is no highlighting --- modules/gitter/widget.go | 2 +- modules/hackernews/widget.go | 2 +- modules/jenkins/widget.go | 2 +- modules/jira/widget.go | 3 ++- modules/todo/display.go | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/gitter/widget.go b/modules/gitter/widget.go index 2acf0893..319c6231 100644 --- a/modules/gitter/widget.go +++ b/modules/gitter/widget.go @@ -113,7 +113,7 @@ func (widget *Widget) contentFrom(messages []Message) string { var str string for idx, message := range messages { str = str + fmt.Sprintf( - `["%d"][""][%s] [blue]%s [lightslategray]%s: [%s]%s [aqua]%s`, + `["%d"][%s] [blue]%s [lightslategray]%s: [%s]%s [aqua]%s[""]`, idx, widget.rowColor(idx), message.From.DisplayName, diff --git a/modules/hackernews/widget.go b/modules/hackernews/widget.go index d2a3f68f..ef602515 100644 --- a/modules/hackernews/widget.go +++ b/modules/hackernews/widget.go @@ -114,7 +114,7 @@ func (widget *Widget) contentFrom(stories []Story) 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] [yellow]%d. [%s]%s [blue](%s)[""]`, idx, widget.rowColor(idx), idx+1, diff --git a/modules/jenkins/widget.go b/modules/jenkins/widget.go index 64d76270..000e34b2 100644 --- a/modules/jenkins/widget.go +++ b/modules/jenkins/widget.go @@ -108,7 +108,7 @@ func (widget *Widget) contentFrom(view *View) string { if validID.MatchString(job.Name) { str = str + fmt.Sprintf( - `["%d"][""][%s] [%s]%-6s[white]`, + `["%d"][%s] [%s]%-6s[white][""]`, idx, widget.rowColor(idx), widget.jobColor(&job), diff --git a/modules/jira/widget.go b/modules/jira/widget.go index 1621eaa9..bef1449b 100644 --- a/modules/jira/widget.go +++ b/modules/jira/widget.go @@ -122,6 +122,7 @@ func (widget *Widget) openItem() { func (widget *Widget) unselect() { widget.selected = -1 + widget.display() } func (widget *Widget) contentFrom(searchResult *SearchResult) string { @@ -129,7 +130,7 @@ func (widget *Widget) contentFrom(searchResult *SearchResult) string { for idx, issue := range searchResult.Issues { fmtStr := fmt.Sprintf( - `["%d"][""][%s] [%s]%-6s[white] [green]%-10s[white] [yellow][%s][white] [%s]%s`, + `["%d"][%s] [%s]%-6s[white] [green]%-10s[white] [yellow][%s][white] [%s]%s[""]`, idx, widget.rowColor(idx), widget.issueTypeColor(&issue), diff --git a/modules/todo/display.go b/modules/todo/display.go index dae2a963..8f021a74 100644 --- a/modules/todo/display.go +++ b/modules/todo/display.go @@ -52,7 +52,7 @@ func (widget *Widget) formattedItemLine(idx int, item *checklist.ChecklistItem, } str := fmt.Sprintf( - `["%d"][""][%s:%s]|%s| %s[white]`, + `["%d"][%s:%s]|%s| %s[white][""]`, idx, foreColor, backColor,