diff --git a/modules/clocks/display.go b/modules/clocks/display.go index 7c1a5bca..ffa986f9 100644 --- a/modules/clocks/display.go +++ b/modules/clocks/display.go @@ -1,15 +1,13 @@ package clocks -import ( - "fmt" -) +import "fmt" func (widget *Widget) display(clocks []Clock, dateFormat string, timeFormat string) { str := "" + if len(clocks) == 0 { str = fmt.Sprintf("\n%s", " no timezone data available") } else { - for idx, clock := range clocks { str += fmt.Sprintf( " [%s]%-12s %-10s %7s[white]\n", diff --git a/view/text_widget.go b/view/text_widget.go index 09f92df4..f143effb 100644 --- a/view/text_widget.go +++ b/view/text_widget.go @@ -38,7 +38,9 @@ func (widget *TextWidget) Redraw(data func() (string, string, bool)) { widget.View.Clear() widget.View.SetWrap(wrap) widget.View.SetTitle(widget.ContextualTitle(title)) - widget.View.SetText(strings.TrimSpace(content)) + // widget.View.SetText(strings.TrimSpace(content)) + widget.View.SetText(strings.TrimRight(content, "\n")) + // widget.View.SetText(content) }) }