Skip to content

Commit 2da9527

Browse files
authored
fix(spin): clear title after finished (#815)
closes #802 Signed-off-by: Carlos Alexandro Becker <[email protected]>
1 parent 05c4bb9 commit 2da9527

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spin/spin.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,6 @@ func (m model) Init() tea.Cmd {
103103
}
104104

105105
func (m model) View() string {
106-
if !m.isTTY {
107-
return m.title
108-
}
109-
110106
var out string
111107
if m.showStderr {
112108
out += errbuf.String()
@@ -115,10 +111,14 @@ func (m model) View() string {
115111
out += outbuf.String()
116112
}
117113

118-
if m.quitting && out != "" {
114+
if m.quitting {
119115
return out
120116
}
121117

118+
if !m.isTTY {
119+
return m.title
120+
}
121+
122122
var header string
123123
if m.align == "left" {
124124
header = m.spinner.View() + " " + m.title

0 commit comments

Comments
 (0)